I have designed a user interface for my computational software using swing (Java). I noticed that when i move the software to a laptop, the panels extends out of screen and some similar problems in nested panels. This makes it very difficult to use the software. How can I solve the problem?
Thanks.
Added: Some part of the codes follows:
public GUI() {
int width=1200;
int height=950;
setTitle("FEM Analysis");
setSize(width, height);
setLayout(new BorderLayout());
setLocation(20, 20);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
.....}
What you might want to consider (if you are not already) is using the screen dimensions to scale the size of the panels between computers with different resolutions. For example if you declared a width and height as such:
private final int WIDTH = Toolkit.getDefaultToolkit().getScreenSize().getWidth();
private final int HEIGHT = Toolkit.getDefaultToolkit().getScreenSize().getHeight();
Then if you multiplied the width or height by a value such as (0.8) that would give you 80% of the value.
Here's a great guide for using screen resolution: http://www.devdaily.com/blog/post/jfc-swing/java-swing-faq-how-determine-screen-size-resolution
Hope this is what you were looking for and help...