I am using NetBeans to convert an app from Visual Basic to Java. I have a JFrame on which I want to place two panels each taking half of the available JFrame space. I am using the absolute layout manager on the JFrame. When I run the app with one panel it refuses to occupy the left half of the JFrame space. here is my initialization code.....
public Titlebar() {
initComponents();
// -- set class to full screen --
Dimension d = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
setLocation(0,0);
setSize(d.width, d.height);
// -- set panel to fill left half of frame --
pnlFields.setLocation(0,50);
pnlFields.setSize(d.width / 2, d.height - 50);
}
thanks
jim murray
public Titlebar() {
initComponents();
// -- set class to full screen --
Dimension d = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
setLocation(0,0);
setSize(d.width, d.height);
// -- set panel to fill left half of frame --
pnlFields.setLocation(0,50);
pnlFields.setSize(d.width / 2, d.height - 50);
}
thanks
jim murray