Java Code Examples for java.awt.TextField#setSize()

The following examples show how to use java.awt.TextField#setSize() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: OverScrollTest.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
OverScrollTest() {
    try {
        robot = new Robot();
    } catch (Exception ex) {
        throw new RuntimeException(ex.getMessage());
    }

    mainFrame = new Frame();
    mainFrame.setSize(400, 200);
    mainFrame.setLocation(200, 200);
    mainFrame.setLayout(new FlowLayout());

    textField = new TextField(10);
    textField.setSize(300, 100);
    textField.setText("123456 789123");
    mainFrame.add(textField);
    mainFrame.setVisible(true);
    textField.requestFocusInWindow();
}
 
Example 2
Source File: EOLTest.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private void testConstructor1() {
    textField = new TextField(testStrEOL);
    textField.setSize(200, 100);
    mainFrame.add(textField);
    checkTest();
    mainFrame.remove(textField);
}
 
Example 3
Source File: EOLTest.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private void testConstructor2() {
    textField = new TextField(30);
    textField.setSize(200, 100);
    mainFrame.add(textField);
    textField.setText(testStrEOL);
    checkTest();
    mainFrame.remove(textField);
}
 
Example 4
Source File: EOLTest.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private void testConstructor3() {
    textField = new TextField(testStrEOL, 30);
    textField.setSize(200, 100);
    mainFrame.add(textField);
    checkTest();
    mainFrame.remove(textField);
}
 
Example 5
Source File: EOLTest.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private void testSetText() {
    textField = new TextField();
    textField.setSize(200, 100);
    textField.setText(testStrEOL);
    mainFrame.add(textField);
    checkTest();
    mainFrame.remove(textField);
}