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
|
Line | |
---|
1 | package genius.gui.panels;
|
---|
2 |
|
---|
3 | import java.awt.BorderLayout;
|
---|
4 | import java.awt.Component;
|
---|
5 | import java.awt.Dimension;
|
---|
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 | */
|
---|
14 |
|
---|
15 | @SuppressWarnings("serial")
|
---|
16 | public class LabelAndComponent extends JPanel {
|
---|
17 | JLabel label;
|
---|
18 |
|
---|
19 | public LabelAndComponent(String text, Component comp) {
|
---|
20 | super(new BorderLayout());
|
---|
21 | this.label = new JLabel(text);
|
---|
22 | label.setPreferredSize(new Dimension(120, 10));
|
---|
23 | add(label, BorderLayout.WEST);
|
---|
24 | add(comp, BorderLayout.CENTER);
|
---|
25 | }
|
---|
26 |
|
---|
27 | public JLabel getLabel() {
|
---|
28 | return label;
|
---|
29 | }
|
---|
30 |
|
---|
31 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.