phoenix451
发贴: 11
积分: 0
|
于 2005-12-06 10:40
import javax.swing.*; import java.awt.*; import java.awt.event.*; public class Debug7_3 extends JFrame { public Debug7_3( String titleText ) { super( titleText ); setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE ); JButton[] buttons = new JButton[9]; for( int i=0; i<buttons.length; i++ ) { buttons[i] = new JButton( String.valueOf( i+1 ) ); add( buttons[i] ); } pack(); setVisible( true ); } public static void main( String[] args ) { new Debug7_3( "Debug Question" ); } }
|