olá !!!
pessoal peguei o exemplo do SPLASH do GUJ… e queria colocar minha aplicação…
só q não consigo de jeito nenhum !!!
como faço para chamar minha aplicação o q está errado ???
public class TestSplash
{
public static void main(String[] args)
{
// Faz o splash aparecer na tela
Splash.getInstance().openSplash();
// Chama a nossa aplicacao principal
InternalFrameDemo b = new InternalFrameDemo();
b.initApplication();
}
}
]o nome da aplicação e InternalFrameDemo …
ó código é o seguinte:
[code]
public class InternalFrameDemo extends JFrame {
JDesktopPane desktop;
public InternalFrameDemo() {
super("InternalFrameDemo");
//TAKE CARE!!!!!!
for (int i = 0; i < 45000; i++)
System.out.println(i);
//TAKE CARE!!!!!!
//Make the big window be indented 50 pixels from each edge
//of the screen.
int inset = 50;
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
setBounds(inset, inset,
screenSize.width - inset*2,
screenSize.height-inset*2);
//Quit this app when the big window closes.
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
}
});
//Set up the GUI.
desktop = new JDesktopPane(); //a specialized layered pane
createFrame(); //Create first window
setContentPane(desktop);
setJMenuBar(createMenuBar());
//Make dragging faster:
desktop.putClientProperty("JDesktopPane.dragMode", "outline");
}
protected JMenuBar createMenuBar() {
JMenuBar menuBar = new JMenuBar();
JMenu menu = new JMenu("Document");
menu.setMnemonic(KeyEvent.VK_D);
JMenuItem menuItem = new JMenuItem("New");
menuItem.setMnemonic(KeyEvent.VK_N);
menuItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
createFrame();
}
});
menu.add(menuItem);
menuBar.add(menu);
return menuBar;
}
protected void createFrame() {
MyInternalFrame frame = new MyInternalFrame();
frame.setVisible(true); //necessary as of 1.3; OK to use before
desktop.add(frame);
try {
frame.setSelected(true);
} catch (java.beans.PropertyVetoException e) {}
}
public static void main(String[] args) {
InternalFrameDemo frame = new InternalFrameDemo();
frame.setVisible(true);
}
//TAKE CARE !!!!!!!!!!!
public void initApplication()
{
frame.pack();
frame.setVisible(true);
Splash.getInstance().finish();
}
//TAKE CARE !!!!!!!!!!!!!!
}[/code]
agradeço… realmente queria saber como chamar outra aplicação usando o modelo desse splash screen…
aparece o splash, mas quando termina de contar … nao aparece nada !!!