如何使进度条慢慢降低时间限制?
class GamePanel extends JPanel implements MouseListener, ActionListener
{
private JButton quit;
private JButton q;
private Font loadFont;
public GamePanel()
{
setBackground(Color.blue); // sets background color
this.setLayout(null);
quit = new JButton("Quit");
quit.addActionListener(this);
quit.setBounds(550, 700, 100, 30);
this.add(quit);
q = new JButton("Questions");
q.addActionListener(this);
q.setBounds(100, 100, 120, 30);
this.add(q);
loadFont = new Font("Serif", Font.PLAIN, 30);
}
public void paintComponent(Graphics g)
{
super.paintComponent(g);
g.setColor(Color.black);
g.fillRect(80, 100, 610, 560);
g.setColor(Color.white);
g.fillRect(90, 110, 110, 100);// 1st column
g.fillRect(90, 220, 110, 100);//
g.fillRect(90, 330, 110, 100);// …Run Code Online (Sandbox Code Playgroud) username = new JTextField("");
username.setBounds(330, 550, 230, 30);
username.addActionListener(this);
username.requestFocus(); // sets focus on JTextField
this.add(username);
Run Code Online (Sandbox Code Playgroud) SWT仅用于Eclipse吗?就像它基本上是Eclipse的Swing版本一样?当我想到这个时,我正在网上阅读一些东西.防爆.http://www.mkyong.com/swt/swt-hello-world-example/