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

Last change on this file since 127 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
RevLine 
[1]1package genius.gui.panels;
2
3import java.awt.BorderLayout;
4import java.awt.Component;
[8]5import java.awt.Dimension;
[1]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 */
[30]14
[1]15@SuppressWarnings("serial")
16public 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.