摘要:
代码:zujian.javapublic class zujian{ public static void main(String args[]){ ComponentInWindow win = new ComponentInWindow(); win.setBounds(100,100,310,260); win.setTitle("常用组件"); }}ComponentInWindow.javaimport java.awt.*;import javax.swing.*;public class ComponentInWindow extends JFrame{ JT 阅读全文
摘要:
代码:caidan.javapublic class caidan{ public static void main(String args[]){ WindowMenu win = new WindowMenu("带菜单的窗口",20,30,200,190); }}WindowMenu.javaimport javax.swing.*;import java.awt.event.InputEvent;import java.awt.event.KeyEvent;import static javax.swing.JFrame.*;public class WindowMe 阅读全文
摘要:
代码:import javax.swing.*;import java.awt.*;public class chuangkou{ public static void main(String args[]) { JFrame window1 = new JFrame("第一个窗口"); JFrame window2 = new JFrame("第二个窗口"); Container con = window1.getContentPane(); con.setBackground(Color.yellow); window1.setBounds(60,1 阅读全文