/** main method */ public static void main(String[] argv) { System.out.println("An Object\t" + new Object()); System.out.println("A Date \t" + new Date()); System.out.println("A GregorianCalendar\t" + new GregorianCalendar()); System.out.println("An Exception\t" + new Exception("Hi!")); Button b = new Button("Push ME!"); // An AWT pushbutton b.setBounds(40, 50, 120, 60); // explained in the AWT chapter! System.out.println("A Button\t" + b); System.out.println("A ShowToString object!\t" + new ShowToString()); } }
for(int j = 0; j < numOfRows; j++){ button = new Button(shell, SWT.NONE); button.setBounds(x, y, buttonWidth, buttonHeight); x += buttonWidth;
/** * Return the ShowButton property value. * @return java.awt.Button */ /* WARNING: THIS METHOD WILL BE REGENERATED. */ private java.awt.Button getShowButton() { if (ivjShowButton == null) { try { ivjShowButton = new java.awt.Button(); ivjShowButton.setName("ShowButton"); ivjShowButton.setBounds(27, 384, 90, 23); ivjShowButton.setLabel("Show Console"); // user code begin {1} // user code end } catch (java.lang.Throwable ivjExc) { // user code begin {2} // user code end handleException(ivjExc); } }; return ivjShowButton; } /**
item.setBounds(WIDTH / 4, ROW3, 2 * WIDTH / 3, 20); add(load = new Button("Load")); load.setBounds(WIDTH / 3, ROW4, WIDTH / 3, 25); load.addActionListener(this); add(status = new TextField("ready to load proxy"));