File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes JPanel - Screen Size Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
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: 19718
    
  20

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 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JPanel - Screen Size