List of usage examples for java.awt Label Label
public Label(String text, int alignment) throws HeadlessException
From source file:gdsc.smlm.ij.plugins.SpotAnalysis.java
private Panel createLabelPanel(Label field, String label, String value) { Panel panel = new Panel(); panel.setLayout(new BorderLayout()); Label listLabel = new Label(label, 0); //listLabel.setFont(monoFont); //textField.setSize(fontWidth * 3, fontWidth); field.setText(value);/*from w w w.j a v a2 s. c o m*/ panel.add(listLabel, BorderLayout.WEST); panel.add(field, BorderLayout.CENTER); return panel; }
From source file:CircleOfSquares.java
RegisterPanel() { setLayout(new BorderLayout(5, 5)); pcRegister = new LabeledRegister(StringTable.pc); optopRegister = new LabeledRegister(StringTable.optop); frameRegister = new LabeledRegister(StringTable.frame); varsRegister = new LabeledRegister(StringTable.vars); setBackground(ColorTable.registersAreaColor); Panel labeledRegisterPanel = new Panel(); labeledRegisterPanel.setLayout(new GridLayout(1, 4, 5, 5)); labeledRegisterPanel.add(pcRegister); labeledRegisterPanel.add(optopRegister); labeledRegisterPanel.add(frameRegister); labeledRegisterPanel.add(varsRegister); Label title = new Label(StringTable.Registers, Label.CENTER); title.setFont(new Font("Helvetica", Font.BOLD, 11)); add("West", title); add("Center", labeledRegisterPanel); }
From source file:CircleOfSquares.java
StackMemoryView() { int[] hComponentCellWidths = new int[4]; hComponentCellWidths[0] = 2;/* ww w. ja v a2s .co m*/ hComponentCellWidths[1] = 2; hComponentCellWidths[2] = 2; hComponentCellWidths[3] = 3; setLayout(new GridSnapLayout(memoryLocationsVisibleCount, 9, hComponentCellWidths)); setBackground(Color.lightGray); Font plainFont = new Font("TimesRoman", Font.PLAIN, 11); setFont(plainFont); Font italicFont = new Font("TimesRoman", Font.ITALIC, 11); for (int i = memoryLocationsVisibleCount - 1; i >= 0; --i) { pointer[i] = new Label("", Label.RIGHT); pointer[i].setFont(italicFont); add(pointer[i]); address[i] = new Label("", Label.CENTER); add(address[i]); wordValue[i] = new Label("", Label.CENTER); add(wordValue[i]); logicalValue[i] = new Label("", Label.CENTER); add(logicalValue[i]); } }
From source file:JVMSimulator.java
MemoryView(int methodAreaMemSectionSize) { int[] hComponentCellWidths = new int[4]; hComponentCellWidths[0] = 2;/*from w ww . j a v a2 s . c om*/ hComponentCellWidths[1] = 2; hComponentCellWidths[2] = 2; hComponentCellWidths[3] = 3; setLayout(new GridSnapLayout(memoryLocationsVisibleCount, 9, hComponentCellWidths)); setBackground(Color.lightGray); Font plainFont = new Font("TimesRoman", Font.PLAIN, 11); setFont(plainFont); Font italicFont = new Font("TimesRoman", Font.ITALIC, 11); for (int i = 0; i < memoryLocationsVisibleCount; ++i) { pointer[i] = new Label("", Label.RIGHT); pointer[i].setFont(italicFont); add(pointer[i]); address[i] = new Label("", Label.CENTER); add(address[i]); byteValue[i] = new Label("", Label.CENTER); add(byteValue[i]); logicalValue[i] = new Label("", Label.LEFT); add(logicalValue[i]); } }
From source file:CircleOfSquares.java
StackMemoryViewTitlePanel() { // setLayout(new GridLayout(1, 4)); int[] hComponentCellWidths = new int[4]; hComponentCellWidths[0] = 2;/*from w ww . jav a2 s . c o m*/ hComponentCellWidths[1] = 2; hComponentCellWidths[2] = 2; hComponentCellWidths[3] = 3; setLayout(new GridSnapLayout(1, 9, hComponentCellWidths)); setFont(new Font("Helvetica", Font.ITALIC, 11)); add(new Label("", Label.CENTER)); add(new Label(StringTable.address, Label.CENTER)); add(new Label(StringTable.hexValue, Label.CENTER)); add(new Label(StringTable.value, Label.CENTER)); }
From source file:CircleOfSquares.java
StackPanel() { setLayout(new BorderLayout()); title = new Label("Stack", Label.CENTER); title.setFont(new Font("Helvetica", Font.BOLD, 11)); add("North", title); add("Center", memoryView); }
From source file:JVMSimulator.java
MemoryViewTitlePanel() { int[] hComponentCellWidths = new int[4]; hComponentCellWidths[0] = 2;//from w w w . j a v a2 s . c o m hComponentCellWidths[1] = 2; hComponentCellWidths[2] = 2; hComponentCellWidths[3] = 3; setLayout(new GridSnapLayout(1, 9, hComponentCellWidths)); setFont(new Font("Helvetica", Font.ITALIC, 11)); add(new Label("", Label.CENTER)); add(new Label(StringTable.address, Label.CENTER)); add(new Label(StringTable.bytecodes, Label.CENTER)); add(new Label(StringTable.mnemonics, Label.LEFT)); }
From source file:JVMSimulator.java
RegisterPanel() { setLayout(new BorderLayout(5, 5)); pcRegister = new LabeledRegister(StringTable.pc); optopRegister = new LabeledRegister(StringTable.optop); frameRegister = new LabeledRegister(StringTable.frame); varsRegister = new LabeledRegister(StringTable.vars); setBackground(SimData.registersAreaColor); Panel labeledRegisterPanel = new Panel(); labeledRegisterPanel.setLayout(new GridLayout(1, 4, 5, 5)); labeledRegisterPanel.add(pcRegister); labeledRegisterPanel.add(optopRegister); labeledRegisterPanel.add(frameRegister); labeledRegisterPanel.add(varsRegister); Label title = new Label(StringTable.Registers, Label.CENTER); title.setFont(new Font("Helvetica", Font.BOLD, 11)); add("West", title); add("Center", labeledRegisterPanel); }
From source file:JVMSimulator.java
StackMemoryViewTitlePanel() { int[] hComponentCellWidths = new int[4]; hComponentCellWidths[0] = 2;//from ww w . j av a2s .c o m hComponentCellWidths[1] = 2; hComponentCellWidths[2] = 2; hComponentCellWidths[3] = 3; setLayout(new GridSnapLayout(1, 9, hComponentCellWidths)); setFont(new Font("Helvetica", Font.ITALIC, 11)); add(new Label("", Label.CENTER)); add(new Label(StringTable.address, Label.CENTER)); add(new Label(StringTable.hexValue, Label.CENTER)); add(new Label(StringTable.value, Label.CENTER)); }