Jgoodies form with custom jpanel
I have a Jgoodies form, here it's code.
public class MainForm{
MainForm(){
createUIComponents();
}
public JPanel getMainPanel() {
return mainPanel;
}
private void createUIComponents() {
}
private JPanel mainPanel;
private JComboBox directDirectionCombobox;
private JButton directLineOkButton;
private JButton crossLineOkButton;
private JComboBox crossLineComboBox;
private JTextField crossLineSizeValue;
private JButton clearButton;
private JLabel directLineLabel;
private JPanel directLinePanel;
private JLabel crossLineLabel;
private JPanel crossLinePanel;
private JPanel okClearButtonPanel;
private JTextField directLineSizeValue;
private JButton saveButton;
private JPanel drawingPanel=new DrawingPanel();
}
DrawingPanel is a custom class which extends JPanel which I want to add on
the panel. Here is a screenshot of user interface. Well, it doesn't work.
JPanel is created, but it's not my custom class. I tried to enable custom
create field in property inspector, but it says that there are null
pointer exception. Any way to add custom class to JPanel?
No comments:
Post a Comment