Last change
on this file since 345 was 30, checked in by dimitrios, 6 years ago |
Additions to uncertainty framework to support tournament configuration and command line running
|
File size:
637 bytes
|
Rev | Line | |
---|
[1] | 1 | package genius.gui.panels;
|
---|
| 2 |
|
---|
| 3 | import java.awt.BorderLayout;
|
---|
| 4 | import java.awt.Component;
|
---|
[8] | 5 | import java.awt.Dimension;
|
---|
[1] | 6 |
|
---|
| 7 | import javax.swing.JLabel;
|
---|
| 8 | import javax.swing.JPanel;
|
---|
| 9 |
|
---|
| 10 | /**
|
---|
| 11 | * Panel with a text on the left and an arbitrary component on the right
|
---|
| 12 | *
|
---|
| 13 | */
|
---|
[30] | 14 |
|
---|
[1] | 15 | @SuppressWarnings("serial")
|
---|
| 16 | public class LabelAndComponent extends JPanel {
|
---|
[30] | 17 | JLabel label;
|
---|
| 18 |
|
---|
[1] | 19 | public LabelAndComponent(String text, Component comp) {
|
---|
| 20 | super(new BorderLayout());
|
---|
[30] | 21 | this.label = new JLabel(text);
|
---|
[8] | 22 | label.setPreferredSize(new Dimension(120, 10));
|
---|
| 23 | add(label, BorderLayout.WEST);
|
---|
[1] | 24 | add(comp, BorderLayout.CENTER);
|
---|
| 25 | }
|
---|
[30] | 26 |
|
---|
| 27 | public JLabel getLabel() {
|
---|
| 28 | return label;
|
---|
| 29 | }
|
---|
| 30 |
|
---|
[1] | 31 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.