source: src/main/java/genius/gui/panels/LabelAndComponent.java@ 346

Last change on this file since 346 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 
1package genius.gui.panels;
2
3import java.awt.BorderLayout;
4import java.awt.Component;
5import java.awt.Dimension;
6
7import javax.swing.JLabel;
8import 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")
16public 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.