use of javax.swing.JTextField in project jdk8u_jdk by JetBrains.
the class DimensionEncapsulation method run.
@Override
public void run() {
runTest(new Panel());
runTest(new Button());
runTest(new Checkbox());
runTest(new Canvas());
runTest(new Choice());
runTest(new Label());
runTest(new Scrollbar());
runTest(new TextArea());
runTest(new TextField());
runTest(new Dialog(new JFrame()));
runTest(new Frame());
runTest(new Window(new JFrame()));
runTest(new FileDialog(new JFrame()));
runTest(new List());
runTest(new ScrollPane());
runTest(new JFrame());
runTest(new JDialog(new JFrame()));
runTest(new JWindow(new JFrame()));
runTest(new JLabel("hi"));
runTest(new JMenu());
runTest(new JTree());
runTest(new JTable());
runTest(new JMenuItem());
runTest(new JCheckBoxMenuItem());
runTest(new JToggleButton());
runTest(new JSpinner());
runTest(new JSlider());
runTest(Box.createVerticalBox());
runTest(Box.createHorizontalBox());
runTest(new JTextField());
runTest(new JTextArea());
runTest(new JTextPane());
runTest(new JPasswordField());
runTest(new JFormattedTextField());
runTest(new JEditorPane());
runTest(new JButton());
runTest(new JColorChooser());
runTest(new JFileChooser());
runTest(new JCheckBox());
runTest(new JInternalFrame());
runTest(new JDesktopPane());
runTest(new JTableHeader());
runTest(new JLayeredPane());
runTest(new JRootPane());
runTest(new JMenuBar());
runTest(new JOptionPane());
runTest(new JRadioButton());
runTest(new JRadioButtonMenuItem());
runTest(new JPopupMenu());
//runTest(new JScrollBar()); --> don't test defines max and min in
// terms of preferred
runTest(new JScrollPane());
runTest(new JViewport());
runTest(new JSplitPane());
runTest(new JTabbedPane());
runTest(new JToolBar());
runTest(new JSeparator());
runTest(new JProgressBar());
if (!failures.isEmpty()) {
System.out.println("These classes failed");
for (final Component failure : failures) {
System.out.println(failure.getClass());
}
throw new RuntimeException("Test failed");
}
}
use of javax.swing.JTextField in project jdk8u_jdk by JetBrains.
the class Test6968363 method run.
@Override
public void run() {
if (this.frame == null) {
Thread.setDefaultUncaughtExceptionHandler(this);
this.frame = new JFrame(getClass().getSimpleName());
this.frame.add(NORTH, new JLabel("Copy Paste a HINDI text into the field below"));
this.frame.add(SOUTH, new JTextField(new MyDocument(), "स", 10));
this.frame.pack();
this.frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
this.frame.setLocationRelativeTo(null);
this.frame.setVisible(true);
} else {
this.frame.dispose();
this.frame = null;
}
}
use of javax.swing.JTextField in project DistributedFractalNetwork by Budder21.
the class Display method createParameters.
private JPanel createParameters() {
zoom = new JTextField(10);
zoom.setFont(labelFont);
zoom.setText("");
xPos = new JTextField(10);
xPos.setText("");
xPos.setFont(labelFont);
yPos = new JTextField(10);
yPos.setFont(labelFont);
yPos.setText("");
zoomSpeed = new JTextField(10);
zoomSpeed.setFont(labelFont);
zoomSpeed.setText("");
maxItrs = new JTextField(10);
maxItrs.setFont(labelFont);
maxItrs.setText("");
bailout = new JTextField(10);
bailout.setFont(labelFont);
bailout.setText("");
JPanel p = new JPanel();
p.setBackground(bgColor);
p.setLayout(new GridLayout(7, 2));
// MaxIteraions
JPanel maxItrs = new JPanel();
maxItrs.setBackground(bgColor);
JLabel maxItrsLabel = new JLabel("Max. Iters:");
maxItrsLabel.setFont(labelFont);
maxItrs.add(maxItrsLabel);
maxItrs.add(this.maxItrs);
this.maxItrs.setAlignmentY(0);
JButton maxItrsAccept = new JButton("Submit");
maxItrsAccept.setFont(new Font("Arial", 12, 14));
maxItrsAccept.setBackground(Color.white);
maxItrsAccept.setAlignmentY(1);
maxItrsAccept.addActionListener(new FractalUpdateListener());
maxItrs.add(maxItrsAccept);
p.add(maxItrs, 6, 0);
// Bailout
JPanel bailout = new JPanel();
bailout.setBackground(bgColor);
JLabel bailoutLabel = new JLabel("Bailout:");
bailoutLabel.setFont(labelFont);
bailout.add(bailoutLabel);
bailout.add(this.bailout);
this.bailout.setAlignmentY(0);
JButton bailoutAccept = new JButton("Submit");
bailoutAccept.setFont(new Font("Arial", 12, 14));
bailoutAccept.setBackground(Color.white);
bailoutAccept.setAlignmentY(1);
bailoutAccept.addActionListener(new FractalUpdateListener());
bailout.add(bailoutAccept);
p.add(bailout, 5, 0);
// zoomSpeed
JPanel zSpeed = new JPanel();
zSpeed.setBackground(bgColor);
JLabel speedLabel = new JLabel("Speed:");
speedLabel.setFont(labelFont);
zSpeed.add(speedLabel);
zSpeed.add(zoomSpeed);
zoomSpeed.setAlignmentY(0);
JButton speedAccept = new JButton("Submit");
speedAccept.setFont(new Font("Arial", 12, 14));
speedAccept.setBackground(Color.white);
speedAccept.setAlignmentY(1);
speedAccept.addActionListener(new FractalUpdateListener());
zSpeed.add(speedAccept);
p.add(zSpeed, 3, 0);
// zoom
JPanel zoomPanel = new JPanel();
zoomPanel.setBackground(bgColor);
JLabel zoomLabel = new JLabel("Zoom:");
zoomLabel.setFont(labelFont);
zoomPanel.add(zoomLabel);
zoomPanel.add(zoom);
zoom.setAlignmentY(0);
JButton zoomAccept = new JButton("Submit");
zoomAccept.setFont(new Font("Arial", 12, 14));
zoomAccept.setBackground(Color.white);
zoomAccept.setAlignmentY(1);
zoomAccept.addActionListener(new FractalUpdateListener());
zoomPanel.add(zoomAccept);
p.add(zoomPanel, 2, 0);
// yPos
JPanel yPosP = new JPanel();
yPosP.setBackground(bgColor);
JLabel yPosLabel = new JLabel("Y-Pos:");
yPosLabel.setFont(labelFont);
yPosP.add(yPosLabel);
yPosP.add(yPos);
yPos.setAlignmentY(0);
JButton yPosAccept = new JButton("Submit");
yPosAccept.setFont(new Font("Arial", 12, 14));
yPosAccept.setBackground(Color.white);
yPosAccept.setAlignmentY(1);
yPosAccept.addActionListener(new FractalUpdateListener());
yPosP.add(yPosAccept);
p.add(yPosP, 1, 0);
// xPos
JPanel xPosP = new JPanel();
xPosP.setBackground(bgColor);
JLabel xPosLabel = new JLabel("X-Pos:");
xPosLabel.setFont(labelFont);
xPosP.add(xPosLabel);
xPosP.add(xPos);
xPos.setAlignmentY(0);
JButton xPosAccept = new JButton("Submit");
xPosAccept.setFont(new Font("Arial", 12, 14));
xPosAccept.setBackground(Color.white);
xPosAccept.setAlignmentY(1);
xPosAccept.addActionListener(new FractalUpdateListener());
xPosP.add(xPosAccept);
p.add(xPosP, 0, 0);
JLabel title = new JLabel("Parameters");
title.setFont(Constants.mediumFont);
title.setOpaque(true);
title.setBackground(bgColor);
JPanel wrapper = new JPanel();
wrapper.setBackground(bgColor);
wrapper.add(title);
p.add(wrapper, 4, 0);
return p;
}
use of javax.swing.JTextField in project adempiere by adempiere.
the class POSClientWindow method init.
private void init() {
container = getContentPane();
container.setLayout(null);
btnConnect = new JButton();
btnConnect.setText("Connect");
btnConnect.setBounds(70, 123, 100, 23);
btnConnect.addActionListener(this);
btnDisconnect = new JButton();
btnDisconnect.setText("Disconnect");
btnDisconnect.setBounds(170, 123, 120, 23);
btnDisconnect.addActionListener(this);
btnDisconnect.setEnabled(false);
lblTitle = new JLabel();
lblTitle.setText("Print POS");
lblTitle.setBounds(120, 13, 180, 23);
lblHost = new JLabel();
lblHost.setText("Host Server");
lblHost.setBounds(55, 40, 190, 23);
fHost = new JTextField();
fHost.setText("localhost");
fHost.setBounds(140, 40, 180, 23);
lblPrint = new JLabel();
lblPrint.setText("Printer");
lblPrint.setBounds(85, 67, 190, 23);
PrintService[] services = PrintServiceLookup.lookupPrintServices(null, null);
cPrint = new JComboBox();
for (PrintService s : services) {
cPrint.addItem(s.getName());
}
cPrint.setBounds(140, 67, 180, 23);
fTerminal.setBounds(0, 190, 300, 300);
fTerminal.setBackground(Color.black);
fTerminal.setForeground(Color.green);
fTerminal.setSelectionColor(Color.red);
fTerminal.setFont(new Font("consolas", 1, 10));
fTerminal.setEnabled(false);
fTerminal.setWrapStyleWord(true);
fTerminal.setLineWrap(true);
container.add(lblTitle);
container.add(lblHost);
container.add(fHost);
container.add(lblPrint);
container.add(cPrint);
container.add(btnConnect);
container.add(btnDisconnect);
JScrollPane scroll = new JScrollPane(fTerminal);
scroll.setBounds(new Rectangle(25, 150, 300, 120));
getContentPane().add(scroll);
}
use of javax.swing.JTextField in project jmeter by apache.
the class BeanShellSamplerGui method createParameterPanel.
private JPanel createParameterPanel() {
// $NON-NLS-1$
JLabel label = new JLabel(JMeterUtils.getResString("bsh_script_parameters"));
parameters = new JTextField(10);
parameters.setName(BeanShellSampler.PARAMETERS);
label.setLabelFor(parameters);
JPanel parameterPanel = new JPanel(new BorderLayout(5, 0));
parameterPanel.add(label, BorderLayout.WEST);
parameterPanel.add(parameters, BorderLayout.CENTER);
return parameterPanel;
}
Aggregations