|
13 | 13 | import java.awt.Color; |
14 | 14 | import java.awt.FlowLayout; |
15 | 15 | import java.awt.Frame; |
| 16 | +import java.awt.Menu; |
| 17 | +import java.awt.MenuBar; |
| 18 | +import java.awt.MenuItem; |
16 | 19 | import java.awt.event.ActionEvent; |
17 | 20 | import java.awt.event.ActionListener; |
18 | 21 | import java.awt.event.WindowAdapter; |
@@ -155,18 +158,40 @@ public void actionPerformed( final ActionEvent event ) { |
155 | 158 | contentBox.add( wrapper ); |
156 | 159 |
|
157 | 160 | // ACTIONS |
158 | | - |
159 | | - contentBox.add( Box.createVerticalStrut( SPACING ) ); |
160 | | - wrapper = new JPanel( new FlowLayout( FlowLayout.RIGHT, 0, 0 ) ); |
161 | | - final JButton exitButton = new JButton( "Quit and Stop Uploading Replays" ); |
162 | | - exitButton.addActionListener( new ActionListener() { |
| 161 | + MenuBar menubar = new MenuBar(); |
| 162 | + Menu file = new Menu("File"); |
| 163 | + MenuItem replays = new MenuItem("View Replays"); |
| 164 | + MenuItem logs = new MenuItem("View Logs"); |
| 165 | + MenuItem exit = new MenuItem("Exit"); |
| 166 | + exit.addActionListener( new ActionListener() { |
163 | 167 | @Override |
164 | 168 | public void actionPerformed( final ActionEvent event ) { |
165 | 169 | GgtrackerUploader.exit(); |
166 | 170 | } |
167 | 171 | } ); |
168 | | - wrapper.add( exitButton ); |
169 | | - wrapper.add( Box.createHorizontalStrut( 3 ) ); |
| 172 | + file.add(replays); |
| 173 | + file.add(logs); |
| 174 | + file.add(exit); |
| 175 | + |
| 176 | + Menu help = new Menu("Help"); |
| 177 | + MenuItem faq = new MenuItem("Online Help"); |
| 178 | + help.add(faq); |
| 179 | + |
| 180 | + menubar.add(file); |
| 181 | + menubar.add(help); |
| 182 | + setMenuBar(menubar); |
| 183 | + |
| 184 | + contentBox.add( Box.createVerticalStrut( SPACING ) ); |
| 185 | + wrapper = new JPanel( new FlowLayout( FlowLayout.RIGHT, 0, 0 ) ); |
| 186 | +// final JButton exitButton = new JButton( "Quit and Stop Uploading Replays" ); |
| 187 | +// exitButton.addActionListener( new ActionListener() { |
| 188 | +// @Override |
| 189 | +// public void actionPerformed( final ActionEvent event ) { |
| 190 | +// GgtrackerUploader.exit(); |
| 191 | +// } |
| 192 | +// } ); |
| 193 | +// wrapper.add( exitButton ); |
| 194 | +// wrapper.add( Box.createHorizontalStrut( 3 ) ); |
170 | 195 | wrapper.add( Utils.createLinkLabel( Consts.APP_VERSION, Consts.URL_HOME_PAGE ) ); |
171 | 196 | contentBox.add( wrapper ); |
172 | 197 |
|
|
0 commit comments