📄 startbean.java~3~
字号:
package com.wiziflow.gui;import javax.swing.*;import java.awt.event.*;import java.awt.*;/** * 开始图标。定义“开始”中的所有属性 */public class StartBean extends Bean { ImageIcon icon = new ImageIcon(com.wiziflow.gui.StartBean.class.getResource("images/start.gif")); JDialog dialog = new JDialog(Frame.getFrames()[0],"属性设置",true); public StartBean() { this.setText("开始"); this.setIcon(icon); JTabbedPane tabPane=new JTabbedPane(); //tabPane.setSize(400,400); JLabel label1=new JLabel("jlabel1"); tabPane.add("常规",label1); dialog.getContentPane().add(tabPane); } /** * Bean类监听双击事件,子类覆盖showPropertyDialog()弹出属性对话框 */ public void showPropertyDialog(){ //System.out.println("startBean showPropertyDialog()"); //dialog.getContentPane().add(new JButton("阿里送到家发")); //dialog.setSize(200,200); dialog.pack(); dialog.setLocationRelativeTo(this); dialog.show();// JOptionPane option = new JOptionPane();// option.removeAll();// dialog=option.createDialog(this,"呵呵!");// dialog.getContentPane().add(new JButton("哈哈"));// dialog.show(); } public JTabbedPane createTabbedPane() { JPanel panel = new JPanel(); return null; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -