Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

calling a class  RSS feed

 
Kendra Payne
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I am trying to put these two programs together to show a splash screen at the beginning of my program. I don't have a clue as to how to do this. Here are the two programs. I am new to Java and really having a hard time. I have read and read and still don't get it. Your help is really appreciated.



 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
here's a very simple example of one of the ways
(I think java 1.6 has a splash screen class)

 
Kendra Payne
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks so much, would I just put the name of the program in place of the MainFrame?
 
Kendra Payne
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am sorry but I just don't understand how to put the two together.
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in DVD() change
//public static void main(String args[])
to
public void createAndShowGUI()

in MainFrame.showSplash change
//createAndShowGUI();
to
new DVD().createAndShowGUI();

and it should work, but you may have a delay between the dispose and the gui
showing - experiment with creating the gui during the splash period, then
showing it when the timer fires.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!