📄 verysimpleabout.java
字号:
/* * VerySimpleAbout * * Created: Thu Apr 12 13:07:13 2001 * $Revision$ * Modified: $Date$ * * Author: Jun Inamori * E-mail: j-office@osa.att.ne.jp * * Copyright (c) 1998-2000 Jun Inamori * 2-24-7 Shinsenri-Kitamachi, Toyonaka , * Osaka 560-0081 , Japan. * All rights reserved. * */package com.oopreserch.example;import java.awt.*;import java.awt.event.*;import javax.swing.*;import com.oopreserch.xml.util.XMLDialog_1_0;/** * @author Jun Inamori * * This class represents the dialog, which will appear * when the user clicks the bottom button of the main * window. */public class VerySimpleAbout extends XMLDialog_1_0{ public VerySimpleAbout() { // true means the modal dialog. super(true); // Based on the Locale of the runtime environment, // this method reads the property resource file. // It may be VerySimpleAbout.properties, // VerySimpleAbout_ja.properties, // VerySimpleAbout_fr.properties or others. // Each property resource file points the XML file // for this GUI, i.e. the localized XML for each locale // can be prepared. // Parse the XML file pointed by the "xml_url" property // and place the Components on the JDialog. readXML(); // After the XML file is parsed, all the Components // on GUI are accessible from "gui" dictionary. // To add the required ActionListener to each // Component, we should define "iniParts()" method. iniParts(); // After the property resource file is read by // "readXML()", the instance of the property resource // file is available within the subclass of // XMLDialog_1_0. It is "res". // We can get any property from "res". setTitle(res.getString("title")); } public void iniParts(){ // To add the ActionListener on JButton below // JTextArea, we get it from "gui" dictionary. JButton close_b=(JButton)(gui.getGUI("diag_close")); close_b.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent e){ hide(); } }); }} //End of : VerySimpleAbout
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -