- Joined
- Nov 18, 2008
- Messages
- 2,209
- Trophies
- 0
- Age
- 32
- Location
- Saskatchewan
- Website
- Visit site
- XP
- 518
- Country
Ok, well I've got a JFrame, and in that frame a JTextArea, a JList, a JTextField, and a JButton. The JTextArea is in its own panel with an EmptyBorder (for spacing), the JList is in its own panel with an EmptyBorder (to make some spacing between the JTextArea and JList), and the JTextField and JButton are in their own panel with an EmptyBorder and FlowLayout.
The JTextArea is at CENTER, the JList is at EAST, and the JTextField and JButton are at SOUTH.
The JTextArea and JList's EmptyBorders have the same top and bottom attributes.
My problem is this:
No matter what I do (setPreferredSize, etc), I can't get the JTextArea and JList to have the same height! It's not so noticeable on Windows, but on Linux it is. What can I change so the JTextArea and JList have the exact same height?
Btw, it's a chat program I'm making, sort of a one-room IRC essentially. More or less it's for my classmates and I to use at school, but it's also my little project to keep me sane during the intense amount of work I have going on.
If someone could give me a little help, I'd appreciate it.
EDIT: Screenshots of the difference. Note the spacing between the JTextArea and the JTextField as opposed to the JList and JTextField (or JButton, as it's overtop that).
Windows:
Linux:
The JTextArea is at CENTER, the JList is at EAST, and the JTextField and JButton are at SOUTH.
The JTextArea and JList's EmptyBorders have the same top and bottom attributes.
My problem is this:
No matter what I do (setPreferredSize, etc), I can't get the JTextArea and JList to have the same height! It's not so noticeable on Windows, but on Linux it is. What can I change so the JTextArea and JList have the exact same height?
Btw, it's a chat program I'm making, sort of a one-room IRC essentially. More or less it's for my classmates and I to use at school, but it's also my little project to keep me sane during the intense amount of work I have going on.
If someone could give me a little help, I'd appreciate it.
EDIT: Screenshots of the difference. Note the spacing between the JTextArea and the JTextField as opposed to the JList and JTextField (or JButton, as it's overtop that).
Windows:
Linux: