Reply
Old 03-02-2012, 07:09 AM   #1 (permalink)
 
Status: Senior Member
Posts: 151,118



Default Java: How to remove a button when the button is clicked?

I am working on a Java program and for the menus I have a constructor for each menu. I set up a button so that when you click it, it builds the next menu and deletes the first. My problem is that it stops whenever I do this. I don't get any error messages or anything, the program just stops. When I delete the remove(0); command it works and both menus are displayed. Why can't I delete the first and how can I get around this?

I know how to remove AN object, and I have done it; but for some reason when I have one menu, and I try to remove it after creating another, it freezes up. I think it's something to do with the button that triggered the method is being removed in the posses.

Unknown_User is offline   Reply With Quote
Old 03-02-2012, 07:09 AM   #2 (permalink)
 
Status: Senior Member
Posts: 272



Default Java: How to remove a button when the button is clicked?

I doubt that is the cause. I guess it's remotely possible, but my impression was that Java doesn't work like that.

If you could show us a trimmed-down version of your code, exhibiting the problem in question, we might be able to figure out how to fix it.
Meklar is offline   Reply With Quote
more..

Reply

Bookmarks

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to check if an asp button is clicked in c#? Louize ASP Code/ ASP Codes 0 08-23-2013 02:06 PM
JAVA - how to Remove the OK button in this code.? anonymous Coding 1 03-05-2013 06:04 PM
Java: Show or hide a panel when the same button is clicked? Unknown_User Programming 0 08-23-2012 12:36 PM
Javascript radio button question; how do I make it so that only on button can be clicked at a time davidduhovniy JavaScript 2 08-08-2011 12:56 AM
java program which produces a random number between 200 and 400 each time a button is clicked. rockerboy111 Code Generator 1 07-24-2011 07:05 PM