Skip to main content

All Questions

Tagged with
0 votes
1 answer
81 views

JButton Only Works When Visibility is Set to True-Java

I am trying to make a simple checkers game basically, and I need the user to only be able to see the tiles and the pieces, not the button. When I set the visibility to True, the program works by ...
Sean.D's user avatar
  • 97
-1 votes
1 answer
103 views

Component array returned by getComponents() method can be changed

I'm trying to set a pressed button invisible and set the rest visible. I used getComponents() method to get the three buttons and change its visibility state but something goes wrong. @Override ...
Bruno's user avatar
  • 1
1 vote
2 answers
945 views

SetVisible(false) with the space occupied

I would hide a JButton in a JApplet. I'm using setVisible() method but I've a problem: it works but my GUI is shifted because of the absence of the component. Is there a way to hide a component and ...
user2896152's user avatar
0 votes
1 answer
177 views

JButton size is set to default size when visibility is changed

Like I said the JButton GR is set to the default size (size of window) when I click JButton MN. When the program is started the JButton GR has the right size (200 by 20), when clicked the menu button ...
BEN2006's user avatar
0 votes
0 answers
33 views

Java Swing - Elements not showing up until mouse hovers over it [duplicate]

I'm currently in the process of programming a Calculator. I have a JFrame, with a JPanel that has all the various elements on it (JButtons, TextArea). However, when the program first starts running, ...
Salmononius2's user avatar
0 votes
1 answer
75 views

JButton problems not showing up?

I have a simple JAVA game launcher that you can create accounts, and log into those accounts. when logged in, you have an option to log off, bringing you back to the main menu of the Launcher. That ...
Bryce Hahn's user avatar
0 votes
1 answer
1k views

Does isVisible() guarantees the visibility of the UI object in JAVA

Its generic question. If I add some UI objects such as JButton etc and check the isVisible property, it would return true. However, does it guarantee that the object is actually rendered and visible ...
user846316's user avatar
  • 6,263
3 votes
2 answers
11k views

How to make a set of jbuttons invisible in java

Apart from using button.setVisible(false), is there an easy way to set a set of jButtons to invisible and visible again? The algorithm is as follows - when the user clicks the checkout button, a set ...
Adesh's user avatar
  • 947
1 vote
4 answers
1k views

How do I allow buttons in one class to set the visibility of other panels in other classes?

I'm having a little trouble with my project. I have one class that is a panel displaying 4 buttons. I have 4 classes(only one so far) that are panels displaying various components. These panels will ...
user1151194's user avatar
1 vote
1 answer
173 views

Setting button to be visible

I'm trying to set a button to be visible "reselect" in a void method, after a radio button clicked, but the variable for the button cannot be used in the actionPerformed method? public class ...
tesfa koli's user avatar