引用页_初学Java:仿写记事本_MenuAbout.java

<< 返回
  

import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;

import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTabbedPane;
import javax.swing.JTextArea;

@SuppressWarnings("serial")
public class MenuAbout extends JDialog implements WindowListener{
	private JTabbedPane tab = null;
	private JTextArea textArea = null;
	private JScrollPane scrollPane = null;
	private JPanel panel = null;
	private JLabel version = null;
	private JLabel author = null;
	public MenuAbout() {
		this.tab = new JTabbedPane();
		this.textArea = new JTextArea();
		this.scrollPane = new JScrollPane(this.textArea, 
				JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,//始终显示垂直滚动条
				JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);//仅在需要的时候显示水平滚动条
		this.panel = new JPanel();
		
		this.version = new JLabel("Notepad Alpha 1.0 (2012.3.22) ");
		this.author = new JLabel("Tieper");
		
		this.panel.add(this.version);
		this.panel.add(this.author);
		
		this.textArea.setEditable(false);	//不可编辑
		this.textArea.setLineWrap(true);	//自动换行
		this.textArea.setText("Tieper\nhttp://blog.csdn.net/tieper/article/details/7384333");
		tab.addTab("版权与作者", this.panel);
		tab.addTab("程序说明", this.scrollPane);
		
		this.add(this.tab);
		this.setTitle("关于 \"记事本\"");
		this.setSize(400, 300);
		this.setLocation(300, 200);
		this.setResizable(false);
		this.setIconImage(null);
		
		this.setVisible(true);
	}
	@Override
	public void windowActivated(WindowEvent arg0) {}
	@Override
	public void windowClosed(WindowEvent arg0) {}
	@Override
	public void windowClosing(WindowEvent arg0) {
		this.dispose();
	}
	@Override
	public void windowDeactivated(WindowEvent arg0) {}
	@Override
	public void windowDeiconified(WindowEvent arg0) {}
	@Override
	public void windowIconified(WindowEvent arg0) {}
	@Override
	public void windowOpened(WindowEvent arg0) {}
}
  
<< 返回
阅读更多
文章标签: java import class null
上一篇引用页_初学Java:仿写记事本_GoDialog.java
下一篇引用页_初学Java:仿写记事本_MyCellRenderer.java
想对作者说点什么? 我来说一句

仿写记事本程序代码

2014年11月02日 3.18MB 下载

仿windows的记事本java基本实现

2013年04月18日 256KB 下载

没有更多推荐了,返回首页

关闭
关闭