I'm making GUI using JSplitPane
and I want to display a JFrame
in the left side of the JSplitPane
and another JFrame
inside the right side of a JSplitPane
.
The name of the other JFrame
is Minimize.java
and Diagram.java
. My problem is how can i call these and display it in the left and right side of the JSplitPane
? An update for this post, I converted my JFrame to a JPanel and successful displayed but the problem now is it didn't perform the function/method.
Here's my code for the Main Form.
public LogicGates()
{
Minimize mi = new Minimize();
//mi.setVisible(true);
JLabel iExp = new JLabel("Inputted Expression: ");
p.add(iExp);
j1= new JLabel("");
j1.setVisible(false);
p.add(j1);
JScrollPane aaScrollPane = new JScrollPane(aa);
//here is my problem,when i run the code it displays the label and jcombobox but didn't perform the function
gatessplit = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, mi, aaScrollPane);
gatessplit.setOneTouchExpandable(true);
gatessplit.setDividerLocation(300);
//Provide minimum sizes for the two components in the split pane.
Dimension minimumSize = new Dimension(150, 80);
//frame.setMinimumSize(minimumSize);
aaScrollPane.setMinimumSize(minimumSize);
//Provide a preferred size for the split pane.
gatessplit.setPreferredSize(new Dimension(900, 500));
}