corejava第8版
This commit is contained in:
1 parent
75e83a331f
commit
e89542a214
522 files changed
+98293
No files matched your search
@@ -0,0 +1,33 @@
|
||||
import java.awt.*;
|
||||
import javax.swing.*;
|
||||
|
||||
/**
|
||||
* @version 1.32 2007-06-12
|
||||
* @author Cay Horstmann
|
||||
*/
|
||||
public class SimpleFrameTest
|
||||
{
|
||||
public static void main(String[] args)
|
||||
{
|
||||
EventQueue.invokeLater(new Runnable()
|
||||
{
|
||||
public void run()
|
||||
{
|
||||
SimpleFrame frame = new SimpleFrame();
|
||||
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||
frame.setVisible(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
class SimpleFrame extends JFrame
|
||||
{
|
||||
public SimpleFrame()
|
||||
{
|
||||
setSize(DEFAULT_WIDTH, DEFAULT_HEIGHT);
|
||||
}
|
||||
|
||||
public static final int DEFAULT_WIDTH = 300;
|
||||
public static final int DEFAULT_HEIGHT = 200;
|
||||
}
|
||||
Reference in new issue
Block a user