15.1 图形用户界面设计.pptVIP

  • 3
  • 0
  • 约1.08万字
  • 约 50页
  • 2018-01-07 发布于河南
  • 举报
15.1 图形用户界面设计

BoxLayout Java技术及其应用 null p.setLayout(null); c.setBounds(int a,int b,int width,int height); Java技术及其应用 Java技术及其应用 import javax.swing.*; import static javax.swing.JFrame.*; import java.awt.*; public class MyJFrame { public static void main(String args[]) { JFrame frame=new JFrame(我的窗口); frame.setBounds(100,100,300,300); frame.setLayout(new FlowLayout()); JButton button=new JButton(按钮); frame.add(button); frame.setVisible(true); frame.setDefaultCloseOperation(EXIT_ON_CLOSE); } } Java技术及其应用 Java技术及其应用 frame.pack() 让窗体自动调整大小到刚好可以容纳要显示的内容。 Ja

文档评论(0)

1亿VIP精品文档

相关文档