This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes JPanel - Screen Size Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply Bookmark "JPanel - Screen Size" Watch "JPanel - Screen Size" New topic
Author

JPanel - Screen Size

rama krishnan
Ranch Hand

Joined: Mar 14, 2008
Posts: 68
How to automatically resize the JPanel on the browser using JApplet based on Screen Size


MRK
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19232

First of all, you'll need to make sure your panel will use the entire JApplet size. Since JApplet uses a BorderLayout by default, that's not a problem. Just add the panel to the center of the JApplet (using BorderLayout.CENTER).

Now secondly, you'll need some Javascript to resize the applet space inside your HTML as well. Let me know if you have the first part figured out, I'll then move this thread to the HTML forum.


SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JPanel - Screen Size
 
Similar Threads
Help me out in Thread
Resizing issues in JTree
panel in JScrollPane-urgent
jpeg in a Jpanel
how to set the size of of a JPanel according to the Screen Size