当前位置: 技术问答>java相关
请高手帮我看看这个程序!
来源: 互联网 发布时间:2015-08-02
本文导语: import javax.swing.*; import java.awt.*; public class TryFlowLayout { static JFrame awindow=new JFrame("This is a Flow Layout"); public static void main(String[] args) { Toolkit thekit=awindow.getToolkit(); Dimension wndSize=thekit.getScre...
import javax.swing.*;
import java.awt.*;
public class TryFlowLayout {
static JFrame awindow=new JFrame("This is a Flow Layout");
public static void main(String[] args) {
Toolkit thekit=awindow.getToolkit();
Dimension wndSize=thekit.getScreenSize();
awindow.setBounds(wndSize.width/4,wndSize.height/4,wndSize.width/2,wndSize.height/2);
awindow.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
FlowLayout flow=new FlowLayout();
Container content=awindow.getContentPane();
for(int i=1;i
import java.awt.*;
public class TryFlowLayout {
static JFrame awindow=new JFrame("This is a Flow Layout");
public static void main(String[] args) {
Toolkit thekit=awindow.getToolkit();
Dimension wndSize=thekit.getScreenSize();
awindow.setBounds(wndSize.width/4,wndSize.height/4,wndSize.width/2,wndSize.height/2);
awindow.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
FlowLayout flow=new FlowLayout();
Container content=awindow.getContentPane();
for(int i=1;i