• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to close a window and open another one

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm a very new programmer so this question may sound stupid but: How do i make a JButton close the current window and open a new one?For example a have an introduction screen in my program and when the user clicks on continue I want it to open the main application window.
Thanx a lot!!
 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Something like this perhaps
 
George Papadopoulos
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank u very much.u've been a great help.
Another question...
what documentation do i need to find commands like dispose etc.?
is there any help program for java or a good reference book maybe?
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The java api is a good site (you can download it, about 30mb zip)
http://java.sun.com/j2se/1.4.2/docs/api/index.html
Depending on your IDE, if you download and instal the api docs, then point
your IDE to where you've unzipped it, you can (generally) highlight the
class name, click on help/JDK help and the api page will open. You can then
go through all of the methods of the class (to see what they do), and check
for inherited methods - in this case dispose() is a method of Window.
 
bacon. tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic