Results 1 to 3 of 3
  1. #1
    habbah is offline Member
    Join Date
    Jan 2010
    Posts
    2
    Rep Power
    0

    Default Ready To Program, Images in HSA Console?

    Can i get images in a HSA console application?

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

    Default

    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.

  3. #3
    habbah is offline Member
    Join Date
    Jan 2010
    Posts
    2
    Rep Power
    0

    Default 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 it always appears ontop of text unless you place the text ontop of c.drawImage (Pic, 16, 16, null);
    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

  1. [SOLVED] Ready to Program Java IDE
    By Starr29 in forum New To Java
    Replies: 9
    Last Post: 07-24-2009, 05:21 PM
  2. Replies: 3
    Last Post: 07-18-2009, 01:26 PM
  3. need help in uploading images in swing program!!!
    By ashton in forum New To Java
    Replies: 10
    Last Post: 01-26-2009, 10:01 AM
  4. Ready to Program Java IDE Problem #4
    By Starr29 in forum New To Java
    Replies: 5
    Last Post: 01-06-2009, 03:38 PM
  5. [SOLVED] Ready to Program Java IDE Problem #2
    By Starr29 in forum New To Java
    Replies: 2
    Last Post: 01-03-2009, 01:02 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •