• 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
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

Need help regards Opening new windows.

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?







 
Rancher
Posts: 3248
30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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:

 
Marshal
Posts: 74348
334
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic