摘要: 代码: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 阅读全文
posted @ 2013-05-28 22:52 同学少年 阅读(474) 评论(0) 推荐(0) 编辑
摘要: 代码: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 阅读全文
posted @ 2013-05-28 22:50 同学少年 阅读(897) 评论(0) 推荐(0) 编辑
摘要: 代码: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 阅读全文
posted @ 2013-05-28 22:45 同学少年 阅读(254) 评论(0) 推荐(0) 编辑