Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

just the trick I want to start from beginning by pressing the then appeared button  RSS feed

 
Ranch Hand
Posts: 403
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I BUILT a guess a number(1-1000) code Java SE , Well that I do not know is that: At end if guess found, the button that configured to appear then, when pressed, how to START GAME FROM STARTUP Generating a new random ...etc
main() is in second file[just for running only], with first file content.

[b]just the trick I want [/b]to start from beginning... I refer for textbook's JAVA HTP7 EXE.11-15
 
Ranch Hand
Posts: 95
Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is that it? If it's not, you can find out how to use the correct command through Java, right?
 
Leonidas Savvides
Ranch Hand
Posts: 403
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am going to try it now... well I may not create another frame obj, same name, upon pressing button "restart game" ?

this must be in main()? how called from a event handler in otherfile.java, Frame() class? I try it but is like not called at all(non in main())...

BTW by this restart of app, I want a final var to be reassigned....well?
 
Andre Brito
Ranch Hand
Posts: 95
Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well... If you're thinking about buttons and frames, you'll may want to use Swing. Things get waaaaay different and easier, then. If that's what you're using, you'll need only one main, starting the main frame. After that, it's all about events...
I'm not going to answer all of your questions. There're plenty of tutorials and free codes on the Internet.
 
I yam what I yam and that's all that I yam - the great philosopher Popeye. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!