一个简单的记事本代码(三) - 编程入门网
作者 佚名技术
来源 NET编程
浏览
发布时间 2012-06-21
tton3Listener implements ActionListener { public void actionPerformed(ActionEvent e){ replace(); } } } //字体类 public class Bfont extends JDialog { JPanel contentPane; JLabel jLabel1 = new JLabel(); String[] data1 = {"Arial", "Arial Black", "Arial Narrow", "Book Antiqua","Bookman Old Style","Century Gothic","Comic Sans MS","Courier","Fixedsys","Garamond"}; JList jList1 = new JList(data1); JLabel jLabel2 = new JLabel(); String[] data2 = {"常规", "斜体", "粗体", "粗斜体"}; JList jList2 = new JList(data2); JLabel jLabel3 = new JLabel(); String[] data3 = {"10", "11", "12", "14","16","18","20"}; JList jList3 = new JList(data3); JButton jButton1 = new JButton(); JComboBox jComboBox1 = new JComboBox(); JLabel jLabel4 = new JLabel(); JTextField jTextField1 = new JTextField("败"); JTextField jTextField2 = new JTextField("Arial"); JTextField jTextField3 = new JTextField("常规"); JTextField jTextField4 = new JTextField("10"); JButton jButton2 = new JButton(); int index; String ziti; int daxiao; int zixing; public Bfont(JTextArea jTextArea1) { enableEvents(AWTEvent.WINDOW_EVENT_MASK); try { jbInit(); } catch(Exception e) { e.printStackTrace(); } } private void jbInit() throws Exception { contentPane = (JPanel) this.getContentPane(); contentPane.setLayout(null); this.getContentPane().setBackground(Color.lightGray); this.setSize(new Dimension(440,315)); this.setTitle("字体"); this.setModal(true); jLabel1.setText("字体"); jLabel1.setBounds(new Rectangle(11, 10, 65, 23)); jTextField2.setBounds(new Rectangle(8, 40, 138, 20)); jList1.setToolTipText("提示"); jList1.setSelectedIndex(0); jList1.setBounds(new Rectangle(8, 61, 138, 115)); jLabel2.setText("字型"); jLabel2.setBounds(new Rectangle(158, 10, 65, 23)); jTextField3.setBounds(new Rectangle(152, 40, 109, 20)); jList2.setSelectedIndex(0); jList2.setBounds(new Rectangle(152, 61, 109, 115)); jLabel3.setText("大小"); jLabel3.setBounds(new Rectangle(273, 10, 65, 23)); jTextField4.setBounds(new Rectangle(267, 40, 66, 20)); jList3.setSelectedIndex(0); jList3.setBounds(new Rectangle(267, 61, 66, 115)); jButton1.setBounds(new Rectangle(344, 38, 81, 26)); jButton1.setText("确定"); jComboBox1.setBounds(new Rectangle(151, 215, 181, 22)); jLabel4.setText("字符集"); jLabel4.setBounds(new Rectangle(152, 188, 65, 23)); jTextField1.setBackground(Color.lightGray); jTextField1.setEnabled(false); jTextField1.setBounds(new Rectangle(10, 194, 127, 79)); jButton2.setBounds(new Rectangle(345, 83, 79, 26)); jButton2.setText("取消"); contentPane.add(jLabel1, null); contentPane.add(jLabel4, null); contentPane.add(jComboBox1, null); contentPane.add(jLabel3, null); contentPane.add(jLabel2, null); contentPane.add(jL |
凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢! |
你可能对下面的文章感兴趣
关于一个简单的记事本代码(三) - 编程入门网的所有评论