From d175a0d7d8b01cda97809ed1e952c6f390ee85d4 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Tue, 25 Jul 2017 22:08:12 -0700 Subject: [PATCH] Make some adjustments to the UI. --- src/org/nwapw/abacus/window/Window.java | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/org/nwapw/abacus/window/Window.java b/src/org/nwapw/abacus/window/Window.java index 0b730b1..61575b7 100644 --- a/src/org/nwapw/abacus/window/Window.java +++ b/src/org/nwapw/abacus/window/Window.java @@ -38,8 +38,8 @@ public class Window extends JFrame { inputPanel = new JPanel(); inputPanel.setLayout(new BorderLayout()); - inputPanel.add(inputField); - inputPanel.add(inputEnterButton, BorderLayout.LINE_END); + inputPanel.add(inputField, BorderLayout.CENTER); + inputPanel.add(inputEnterButton, BorderLayout.EAST); historyArea = new JTextArea(history); historyAreaScroll = new JScrollPane(historyArea); @@ -49,29 +49,29 @@ public class Window extends JFrame { outputPanel = new JPanel(); outputPanel.setLayout(new BorderLayout()); - outputPanel.add(historyAreaScroll); - outputPanel.add(lastOutputArea, BorderLayout.PAGE_END); + outputPanel.add(historyAreaScroll, BorderLayout.CENTER); + outputPanel.add(lastOutputArea, BorderLayout.SOUTH); numberSystemList = new JComboBox<>(); numberSystemPanel = new JPanel(); numberSystemPanel.setLayout(new BorderLayout()); - numberSystemPanel.add(new JLabel("Number Type:")); - numberSystemPanel.add(numberSystemList, BorderLayout.PAGE_END); + numberSystemPanel.add(new JLabel("Number Type:"), BorderLayout.NORTH); + numberSystemPanel.add(numberSystemList, BorderLayout.CENTER); functionList = new JComboBox<>(); functionSelectButton = new JButton("Select"); functionSelectPanel = new JPanel(); functionSelectPanel.setLayout(new BorderLayout()); - functionSelectPanel.add(new JLabel("Functions:")); - functionSelectPanel.add(functionList, BorderLayout.LINE_END); - functionSelectPanel.add(functionSelectButton, BorderLayout.LINE_END); + functionSelectPanel.add(new JLabel("Functions:"), BorderLayout.NORTH); + functionSelectPanel.add(functionList, BorderLayout.CENTER); + functionSelectPanel.add(functionSelectButton, BorderLayout.SOUTH); sidePanel = new JPanel(); sidePanel.setLayout(new BorderLayout()); - sidePanel.add(numberSystemPanel); - sidePanel.add(functionSelectPanel, BorderLayout.PAGE_END); + sidePanel.add(numberSystemPanel, BorderLayout.NORTH); + sidePanel.add(functionSelectPanel, BorderLayout.SOUTH); add(outputPanel, BorderLayout.CENTER); add(sidePanel, BorderLayout.EAST);