Results 1 to 3 of 3
  1. #1
    srbehera is offline Member
    Join Date
    Apr 2011
    Posts
    2
    Rep Power
    0

    Default Java Applet: drawing window bigger than screen

    I want to draw a large grid which contains 1000 vertical lines and 200 horizontal line and the gap between then is 50. The coordinate of corner points are (0,0) (0,50000) (10000,0) and (10000,50000). So this will be larger than the window screen. How can I draw this using scrollbars so that I can use the coordinates properly.

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

    Default

    Draw it in a BufferedImage of the proper size, then add this to an ImageIcon and the icon to a JLabel. Add the JLabel to a JScrollPane and you're all set. You may run out of memory and may need to increase the memory available to Java for this to work.

  3. #3
    srbehera is offline Member
    Join Date
    Apr 2011
    Posts
    2
    Rep Power
    0

    Default

    Thanks for the reply. I am new to java applet. Could you please send me some sample codes how to write this or some links where I can find some examples of BufferedImage and ImageIcon. I am also trying to search some examples but please send me if you know.

Similar Threads

  1. Full Screen window over toolbar
    By vmcg in forum AWT / Swing
    Replies: 3
    Last Post: 07-10-2010, 03:43 AM
  2. ! sign on my JAVA applet window
    By Emaany in forum Java Applets
    Replies: 1
    Last Post: 09-30-2009, 07:48 PM
  3. drawing window
    By BlitzA in forum New To Java
    Replies: 1
    Last Post: 01-15-2009, 12:55 PM
  4. screen scraper for java applet website
    By sheriek in forum Java Applets
    Replies: 3
    Last Post: 09-25-2008, 09:48 AM
  5. drawing window
    By BlitzA in forum Advanced Java
    Replies: 0
    Last Post: 12-30-2007, 05:39 PM

Posting Permissions

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