原始问题:
Java Swing 技术解析与应用指南
/test.java
§§ 1000
+package javaswing;
+import java.awt.*;
+import javax.swing.*;
+public class test {
- test(){
- JFrame f= new JFrame();//creating instance of JFrame
- JButton b=new JButton("click");//creating instance of JButton
- b.setBounds(130,100,100, 40);//x axis, y axis, width, height
- f.add(b);//adding button in JFrame f.setSize(400,500);//400 width and 500 height f.setLayout(null); //using no layout managers f.setVisible(true); //making the frame visible } public static void main(String[] args) { new test(); } }
Prev:“纶音”一词是如何使用?请举例说明