📄 frame1.java
字号:
import javax.swing.JFrame;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.plaf.synth.SynthLookAndFeel;
import com.sun.java.swing.plaf.motif.MotifLookAndFeel;
import javax.swing.JFrame;
import javax.swing.JButton;
import java.awt.Rectangle;
/**
* <p>Title: </p>
*
* <p>Description: </p>
*
* <p>Copyright: Copyright (c) 2006</p>
*
* <p>Company: </p>
*
* @author not attributable
* @version 1.0
*/
public class Frame1 extends JFrame {
JButton jButton1 = new JButton();
public static void main(String[] args) throws Exception
{
Runnable runner = new Runnable()
{
public void run()
{
try
{
SynthLookAndFeel synth = new SynthLookAndFeel();
synth.load(Frame1.class.getResourceAsStream("demo.xml"), Frame1.class);
UIManager.setLookAndFeel(synth);
}
catch (Exception ex)
{
ex.printStackTrace();
}
}
};
SwingUtilities.invokeAndWait(runner);
Frame1 f = new Frame1();
f.setVisible(true);
}
public Frame1() {
try {
jbInit();
} catch (Exception exception) {
exception.printStackTrace();
}
}
private void jbInit() throws Exception {
this.setSize(341, 275);
this.setTitle("Login");
getContentPane().setLayout(null);
jButton1.setBounds(new Rectangle(89, 127, 100, 45));
jButton1.setText("jButton1");
this.getContentPane().add(jButton1);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -