• 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

Toggles Button and Additional Text

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello there, I'm new to the website. I hope i could get some help with my java.
Here's what it looks like



I required to activate those toggles Metric button, by clicking it. Then the unit will convert into ft and lb instead m and kg. I'm not sure how to do it.
Also, i need to move the Pop up message dialog box outside into the same window, rather than separate window.
Any tips on how to do it ?
Thanks



 
Bartender
Posts: 1104
10
Netbeans IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Eliza,
Welcome to the Ranch!

I am unable to see the image. As for toggling, there is a separate JToggleButton available - I think that fits your scenario. You can read about them in the tutorial here.

As for the popup, you have passed 'null' to the first parameter of the showMessageDialog. This paramater indicates the 'owner' of the popup - in your case, you have to pass the instance of the your main frame for the popup to appear inside.
 
Eliza Parker
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ranganathan Kaliyur Mannar wrote:Hi Eliza,
Welcome to the Ranch!

I am unable to see the image. As for toggling, there is a separate JToggleButton available - I think that fits your scenario. You can read about them in the tutorial here.

As for the popup, you have passed 'null' to the first parameter of the showMessageDialog. This paramater indicates the 'owner' of the popup - in your case, you have to pass the instance of the your main frame for the popup to appear inside.



Thanks, here's i already update the picture. I'll try to give them a go on JToggleButton later.
Um, actually i dont need to move the pop up. I just required the following text to be appear inside the box. Not the pop up. I said it wrong way on previous post.
 
Every plan is a little cooler if you have a blimp. And a tiny ad.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic