Results 1 to 3 of 3
- 01-17-2010, 03:36 AM #1
Member
- Join Date
- Jan 2010
- Posts
- 2
- Rep Power
- 0
-
HSA is not part of standard Java, so I will wager that most here are not that familiar with it. That being said, I'll bet that since it has "console" in the title, that it's not for creating GUI applications. You'll probably be much better off creating a Swing app if you want to incorporate pictures.
- 01-17-2010, 04:50 AM #3
Member
- Join Date
- Jan 2010
- Posts
- 2
- Rep Power
- 0
Found Something
This seems to work:
Java Code:import java.awt.*; import hsa.Console; import java.awt.image.*; public class img1 implements ImageObserver { static Console c = new Console (); public Image Pic; public Image Pic2; public static void main (String[] args) { new img1 (); } public img1 () { Toolkit tk = Toolkit.getDefaultToolkit (); Pic = tk.getImage ("1.jpg"); tk.prepareImage (Pic, -1, -1, this); } public boolean imageUpdate (Image img, int infoflags, int x, int y, int width, int height) { if (infoflags == 32) { c.drawImage (Pic, 16, 16, null); } return true; } }
but there is a white line that covers the image were the text is, and if you do this you can not add more then one image or else the text will appear 2, or asmany images as you have :P i guess ill just work around this
Similar Threads
-
[SOLVED] Ready to Program Java IDE
By Starr29 in forum New To JavaReplies: 9Last Post: 07-24-2009, 06:21 PM -
[SOLVED] Ready to Program Java IDE Problem #3 PacMan For Loop to Slide Across the Scr
By Starr29 in forum New To JavaReplies: 3Last Post: 07-18-2009, 02:26 PM -
need help in uploading images in swing program!!!
By ashton in forum New To JavaReplies: 10Last Post: 01-26-2009, 11:01 AM -
Ready to Program Java IDE Problem #4
By Starr29 in forum New To JavaReplies: 5Last Post: 01-06-2009, 04:38 PM -
[SOLVED] Ready to Program Java IDE Problem #2
By Starr29 in forum New To JavaReplies: 2Last Post: 01-03-2009, 02:02 AM
Bookmarks