I'm designing a really simple GUI but without any luck. Basically the outer layout has two columns which is a splitter pane (this is for an IRC client I'm writing). On the left-hand side is the server/channel/user tree and on the right is the chat pane. Now I break this down so on the right-hand side there's the output pane at the top, and a single-lined input box at the bottom.
This is the code for creating the GUI on a whole (this is just a snippet)
ChatModel cm = new ChatModel();
ChatView cv = new ChatView(cm);
treeViewChatSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, serverTreeView, cv);
treeViewChatSplitPane.setSize(500, 500);
treeViewChatSplitPane.setBorder(null);
treeViewChatSplitPane.setDividerSize(3);
this.getContentPane().add(treeViewChatSplitPane);
this.setSize(500, 500);
The ChatView constructor has this in it (it extends java.awt.Container)
this.model = model;
this.setLayout(new BorderLayout());
mainTextArea = new JTextArea();
mainTextArea.setLineWrap(true);
mainTextArea.setBackground(new Color(255, 255, 255));
inputField = new JTextField();
this.add(mainTextArea, BorderLayout.CENTER);
this.add(inputField, BorderLayout.PAGE_END);
Now it looks fine initially, but the problem I'm having with it is that you can move the splitter to the left, but not to the right. In fact, if you move it left, you can no longer move it right. I did have it working earlier, but the implementation wasn't as good and I've forgotten what I had done.
Any ideas? I can't see why this wouldn't work.