|
48 | 48 | @SuppressWarnings("serial") |
49 | 49 | public class LogManagerWindow extends JFrame { |
50 | 50 |
|
51 | | -// private JPanel contentPane; |
| 51 | + private JPanel contentPane; |
| 52 | + private JTabbedPane tabbedPane; |
| 53 | + |
52 | 54 | /** |
53 | 55 | * FileChooser which opens to user's directory |
54 | 56 | */ |
55 | 57 | protected JFileChooser fc = new JFileChooser(new File(System.getProperty("user.dir"))); |
56 | 58 | private File OUT_DIR = new File(System.getProperty("user.dir")); |
57 | 59 |
|
58 | | - private JTabbedPane tabbedPane; |
59 | | - |
60 | 60 | private String[] column = {"Status","Command","Start Time", "Stop Time"};; |
61 | 61 |
|
62 | 62 | private JPanel pnl_Settings; |
@@ -103,14 +103,33 @@ public void initialize() { |
103 | 103 | setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); |
104 | 104 | setBounds(125, 125, 650, 350); |
105 | 105 |
|
| 106 | + contentPane = new JPanel(); |
| 107 | + contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); |
| 108 | + setContentPane(contentPane); |
| 109 | + SpringLayout sl_contentPane = new SpringLayout(); |
| 110 | + contentPane.setLayout(sl_contentPane); |
| 111 | + |
| 112 | + // Add banner notifying user of beta-feature |
| 113 | + JPanel bannerPane = new JPanel(); |
| 114 | + sl_contentPane.putConstraint(SpringLayout.NORTH, bannerPane, 5, SpringLayout.NORTH, contentPane); |
| 115 | + sl_contentPane.putConstraint(SpringLayout.WEST, bannerPane, 10, SpringLayout.WEST, contentPane); |
| 116 | + sl_contentPane.putConstraint(SpringLayout.EAST, bannerPane, 10, SpringLayout.EAST, contentPane); |
| 117 | + sl_contentPane.putConstraint(SpringLayout.SOUTH, bannerPane, 30, SpringLayout.NORTH, contentPane); |
| 118 | + bannerPane.setBackground(new Color(102, 102, 153)); // Color from MetalTheme docs (https://docs.oracle.com/javase/8/docs/api/javax/swing/plaf/metal/DefaultMetalTheme.html#getPrimary1--) |
| 119 | + contentPane.add(bannerPane); |
| 120 | + |
| 121 | + // Text of banner pane |
| 122 | + JLabel bannerText = new JLabel("Logging is currently a beta feature, please report any bugs to Github."); |
| 123 | + bannerText.setForeground(Color.WHITE); |
| 124 | + bannerPane.add(bannerText); |
| 125 | + |
| 126 | + // Set-up tabbed panel |
106 | 127 | tabbedPane = new JTabbedPane(JTabbedPane.TOP); |
107 | | - setContentPane(tabbedPane); |
108 | | - SpringLayout sl_tabbedPane = new SpringLayout(); |
109 | | - |
110 | | - sl_tabbedPane.putConstraint(SpringLayout.NORTH, tabbedPane, 10, SpringLayout.NORTH, getContentPane()); |
111 | | - sl_tabbedPane.putConstraint(SpringLayout.WEST, tabbedPane, 10, SpringLayout.WEST, getContentPane()); |
112 | | - sl_tabbedPane.putConstraint(SpringLayout.SOUTH, tabbedPane, -10, SpringLayout.SOUTH, getContentPane()); |
113 | | - sl_tabbedPane.putConstraint(SpringLayout.EAST, tabbedPane, -10, SpringLayout.EAST, getContentPane()); |
| 128 | + sl_contentPane.putConstraint(SpringLayout.NORTH, tabbedPane, 5, SpringLayout.SOUTH, bannerPane); |
| 129 | + sl_contentPane.putConstraint(SpringLayout.WEST, tabbedPane, 10, SpringLayout.WEST, contentPane); |
| 130 | + sl_contentPane.putConstraint(SpringLayout.SOUTH, tabbedPane, -10, SpringLayout.SOUTH, contentPane); |
| 131 | + sl_contentPane.putConstraint(SpringLayout.EAST, tabbedPane, -10, SpringLayout.EAST, contentPane); |
| 132 | + contentPane.add(tabbedPane); |
114 | 133 |
|
115 | 134 | // >>>>>>>> Settings <<<<<<<< |
116 | 135 | pnl_Settings = new JPanel(); |
|
0 commit comments