@@ -206,7 +206,11 @@ private void initComponents() {
206206 setTitle (resourceMap .getString ("title" ));
207207 }
208208
209- JPanel panMain = new JPanel (new GridBagLayout ());
209+ JTabbedPane panTabs = new JTabbedPane ();
210+
211+ JPanel panBasic = new JPanel (new GridBagLayout ());
212+ JPanel panRewards = new JPanel (new GridLayout (2 , 0 ));
213+
210214 JPanel panInfo = new JPanel (new GridBagLayout ());
211215 JPanel panWrite = new JPanel (new GridBagLayout ());
212216 JPanel panBtn = new JPanel (new FlowLayout ());
@@ -215,7 +219,7 @@ private void initComponents() {
215219 gbc .gridx = 0 ;
216220 gbc .gridy = 0 ;
217221 gbc .gridwidth = 1 ;
218- gbc .anchor = GridBagConstraints .WEST ;
222+ gbc .anchor = GridBagConstraints .NORTHWEST ;
219223 gbc .insets = new Insets (5 , 5 , 5 , 5 );
220224 panInfo .add (new JLabel (resourceMap .getString ("lblName.text" )), gbc );
221225
@@ -314,6 +318,7 @@ public Component getListCellRendererComponent(final JList<?> list, final Object
314318
315319 initMapPanel (resourceMap );
316320 gbc .gridy ++;
321+ gbc .weighty = 1.0 ;
317322 panInfo .add (panMap , gbc );
318323
319324 initObjectivesPanel (resourceMap );
@@ -331,11 +336,8 @@ public Component getListCellRendererComponent(final JList<?> list, final Object
331336 BorderFactory .createEmptyBorder (5 ,5 ,5 ,5 )));
332337
333338 initOtherForcesPanel (resourceMap );
334- panOtherForces .setBorder (BorderFactory .createCompoundBorder (
335- BorderFactory .createEmptyBorder (0 , 0 , 10 , 0 ),
336- BorderFactory .createTitledBorder (resourceMap .getString ("panOtherForces.title" ))));
337- panOtherForces .setPreferredSize (new Dimension (600 ,250 ));
338- panOtherForces .setMinimumSize (new Dimension (600 ,250 ));
339+ panOtherForces .setPreferredSize (new Dimension (600 ,300 ));
340+ panOtherForces .setMinimumSize (new Dimension (600 ,300 ));
339341
340342 txtDesc = new MarkdownEditorPanel (resourceMap .getString ("txtDesc.title" ));
341343 txtDesc .setText (scenario .getDescription ());
@@ -396,43 +398,28 @@ public Component getListCellRendererComponent(final JList<?> list, final Object
396398 btnClose .addActionListener (this ::btnCloseActionPerformed );
397399 panBtn .add (btnClose );
398400
399- getContentPane ().add (panMain , BorderLayout .CENTER );
400- getContentPane ().add (panBtn , BorderLayout .PAGE_END );
401-
402- JPanel panNW = new JPanel (new GridBagLayout ());
403401 gbc = new GridBagConstraints ();
404402 gbc .gridx = 0 ;
405403 gbc .gridy = 0 ;
406- gbc .gridheight = 2 ;
407- gbc .anchor = GridBagConstraints .NORTHWEST ;
408- gbc .fill = GridBagConstraints .HORIZONTAL ;
409- gbc .weightx = 1.0 ;
404+ gbc .weightx = 0.0 ;
410405 gbc .weighty = 1.0 ;
411- panNW .add (panInfo , gbc );
412- gbc .gridx = 1 ;
413- gbc .gridheight = 1 ;
414- gbc .fill = GridBagConstraints .BOTH ;
415- panNW .add (panObjectives , gbc );
416- gbc .gridy = 1 ;
417- panNW .add (panLoot , gbc );
418-
419- gbc = new GridBagConstraints ();
420- gbc .gridx = 0 ;
421- gbc .gridy = 0 ;
422- gbc .weightx = 1.0 ;
423- gbc .weighty = 0.0 ;
424406 gbc .anchor = GridBagConstraints .NORTHWEST ;
425407 gbc .fill = GridBagConstraints .BOTH ;
426- panMain .add (panNW , gbc );
408+ panBasic .add (panInfo , gbc );
427409 gbc .gridx = 1 ;
428410 gbc .gridy = 0 ;
429- gbc .gridheight = 2 ;
430- gbc .weighty = 1.0 ;
431- panMain .add (panWrite , gbc );
432- gbc .gridx = 0 ;
433- gbc .gridy = 1 ;
434- gbc .gridheight = 1 ;
435- panMain .add (panOtherForces , gbc );
411+ gbc .weightx = 1.0 ;
412+ panBasic .add (panWrite , gbc );
413+
414+ panRewards .add (panObjectives );
415+ panRewards .add (panLoot );
416+
417+ panTabs .add (resourceMap .getString ("panTab.basic" ), panBasic );
418+ panTabs .add (resourceMap .getString ("panTab.rewards" ), panRewards );
419+ panTabs .add (resourceMap .getString ("panTab.otherforces" ), panOtherForces );
420+
421+ getContentPane ().add (panTabs , BorderLayout .CENTER );
422+ getContentPane ().add (panBtn , BorderLayout .PAGE_END );
436423
437424 pack ();
438425 }
0 commit comments