Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Need help regards Opening new windows.  RSS feed

 
Eddie Dab
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey guys i am sort of new to Java but at the same time i have been doing abit of programming on the side... Not something i am proud of, but it somehow I get around.
The problem i am having has probably been around this forum for a while but i just cant seem to find it and implement the solution for it...
Okay here we go. I have a window A with Tab layout and each tab has a button, once button is clicked a window B opens with abit of animation. A use of word " animation" may be out of place.
Well what i have so far works , okay to some point. But once the button is clicked to to close the window B i cant seem to reopen the same window. But the main problem is that i cant seem to open windows C D E F etc. you get my point.
Would be glad if anyone could help me out, [u]a bottle of wine is on me.[/u] once i get it sorted.

Note : window A = TabDemoButtons Window B= httpLog. No matter what i do i cant seem to create other windows (Windows are name after buttons)
so that they could be opened...


P.S. is the "animation" good enough or should i went for something else? Draw lines?







 
Rob Camick
Ranch Hand
Posts: 2754
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Too much code to look at in detail. The animation code is irrelevant to the question. Your question is about opening the same window. It doesn't matter if that window does animation or not.

i cant seem to reopen the same window.


Don't keep using "new Window?(...)"

Keep a variable to track each window then your logic when you click on the button would be something like:

 
Campbell Ritchie
Sheriff
Posts: 53769
127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And welcome to the Ranch

Do you use new Windows in JavaFX? I know you would not usually create more than one Window/Frame/etc in AWT or Swing. For additional windows one usually uses a dialogue. Do you do the same in FX (since your code appears to be FX rather than Swing)?
 
Eddie Dab
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello guys and thank you for the welcome. I probably should have specified the part of the code that is giving me bother,



Is what i amusing to open the window, the code where new window are created is not used. Just forgot to remove it.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!