
Untitled
By: a guest on Jan 28th, 2012 | syntax:
None | size: 1.08 KB | hits: 15 | expires: Never
//////////////THE GUI////////////////
package TabMaker;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JFrame;
public class UI extends JFrame{
String[] tabs = {"varrock","house","camelot"};
JComboBox tab = new JComboBox(tabs);
JButton Start = new JButton("Start");
public UI(){
setLayout(null);
tab.setBounds(20, 30, 100, 30);
Start.setBounds(15, 5, 40, 20);//this be the gui
setSize(200, 100);
add(tab);
add(Start);
StartH();
}
private void StartH(){
Start.addActionListener(new ActionListener(){
@Override
public void actionPerformed(ActionEvent arg0) {
dispose();
}
});//one sec let me add this
}
}
///////////////////////Where it is Opened///////////////////////////
@Override
public boolean onStart()
{
try{
UI x = new UI();
x.setVisible(true);//here is where i open it
}catch(Exception e){
Log.log("failed to open GUI, hope you have varrock tabs :)");
}