Results 1 to 2 of 2
Thread: How to output to panel as a .gif
- 03-13-2009, 03:26 PM #1
Member
- Join Date
- Mar 2009
- Posts
- 1
- Rep Power
- 0
How to output to panel as a .gif
Hey guys
I'm still a bit of a newbie but I'm writing a program that calculates the result of a formula and then outputs the sum (int) onto a panel. Now I've got it outputting to the panel just fine using the g.drawstring method, but I'd like to use images of numbers that I've created in Photoshop as they look better.
Is this relatively easy, or even possible to do? I've created the numbers 0-9 in Photoshop as .gif files.
Many thanks.
-
You could create ImageIcons out of the images and place these icons on JLabels as needed and display your result this way. You'll need to learn about using various layout managers such as the BoxLayout (if you don't already know about these), but fortunately there's much info on layouts and on using JLabels on the Sun Swing tutorial.
Similar Threads
-
panel resizing
By kumar_gemi in forum New To JavaReplies: 3Last Post: 03-13-2009, 02:51 AM -
Java, output string, getting correct output? HELP!
By computerboyo in forum New To JavaReplies: 2Last Post: 02-25-2009, 11:44 PM -
panel positioning
By shwein in forum New To JavaReplies: 4Last Post: 09-09-2008, 05:15 PM -
add image on panel
By samiksha.goel in forum AWT / SwingReplies: 4Last Post: 08-02-2008, 07:38 PM -
Help with drag from panel
By fernando in forum AWT / SwingReplies: 2Last Post: 08-07-2007, 10:19 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks