Permalink
Browse files

Rearranged elements on GUI by adding a new JSplitPanel.

  • Loading branch information...
1 parent 40d088b commit b39dff737c57e6d685d1510ad594e896a737af22 @salvadorjesus committed Mar 12, 2011
Showing with 19 additions and 2 deletions.
  1. +19 −2 src/gui/GuiView.java
View
@@ -26,6 +26,7 @@
import javax.swing.JScrollPane;
import javax.swing.JSplitPane;
+import javax.swing.JToggleButton;
public class GuiView {
@@ -39,6 +40,7 @@
private JScrollPane inputJSP = null;
private JScrollPane outputJSP = null;
private JSplitPane centerJSP = null;
+ private JSplitPane mainJSP = null;
/**
* This method initializes jFrame
*
@@ -65,8 +67,7 @@ private JPanel getJContentPane() {
jContentPane = new JPanel();
jContentPane.setLayout(new BorderLayout());
jContentPane.add(getGenCodeJB(), BorderLayout.NORTH);
- jContentPane.add(getMessageJSP(), BorderLayout.SOUTH);
- jContentPane.add(getCenterJSP(), BorderLayout.CENTER);
+ jContentPane.add(getMainJSP(), BorderLayout.CENTER);
}
return jContentPane;
}
@@ -191,6 +192,22 @@ private JSplitPane getCenterJSP() {
}
/**
+ * This method initializes mainJSP
+ *
+ * @return javax.swing.JSplitPane
+ */
+ private JSplitPane getMainJSP() {
+ if (mainJSP == null) {
+ mainJSP = new JSplitPane();
+ mainJSP.setOrientation(JSplitPane.VERTICAL_SPLIT);
+ mainJSP.setDividerLocation(225);
+ mainJSP.setBottomComponent(getMessageJSP());
+ mainJSP.setTopComponent(getCenterJSP());
+ }
+ return mainJSP;
+ }
+
+ /**
* Launches this application
*/
public static void main(String[] args) {

0 comments on commit b39dff7

Please sign in to comment.