begin working on ui - messing around with JSplitPane

This commit is contained in:
mykola2312 2024-04-08 12:28:33 +03:00
parent 184a75752f
commit 5c4d25a846

View file

@ -9,7 +9,24 @@ public class MainFrame {
private JFrame frame; private JFrame frame;
public void create(short width, short height, boolean fullscreen) { public void create(short width, short height, boolean fullscreen) {
this.frame = new JFrame(I18n.get("MainFrame_Title")); frame = new JFrame(I18n.get("MainFrame_Title"));
JPanel categoryPanel = new JPanel();
JPanel rightPanel = new JPanel();
JPanel statusPanel = new JPanel();
JPanel channelPanel = new JPanel();
JSplitPane vsp = new JSplitPane(JSplitPane.VERTICAL_SPLIT, statusPanel, channelPanel);
rightPanel.add(vsp);
JSplitPane hsp = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, categoryPanel, rightPanel);
hsp.setDividerLocation(0.30);
frame.add(hsp);
categoryPanel.add(new JButton("category"));
statusPanel.add(new JButton("status"));
channelPanel.add(new JButton("channel"));
if (fullscreen) { if (fullscreen) {
frame.setUndecorated(true); frame.setUndecorated(true);