Results 1 to 2 of 2
Thread: How to output to panel as a .gif
- 03-13-2009, 04:26 PM #1Member
- Join Date
- Mar 2009
- Rep Power
How to output to panel as a .gif
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.
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.
- By kumar_gemi in forum New To JavaReplies: 3Last Post: 03-13-2009, 03:51 AM
- By computerboyo in forum New To JavaReplies: 2Last Post: 02-26-2009, 12:44 AM
- By shwein in forum New To JavaReplies: 4Last Post: 09-09-2008, 05:15 PM
- By samiksha.goel in forum AWT / SwingReplies: 4Last Post: 08-02-2008, 07:38 PM
- By fernando in forum AWT / SwingReplies: 2Last Post: 08-07-2007, 10:19 PM