Skip to content
Advertisement

Tag: jframe

How do I make it so that the table is displayed inside the JFrame in Main?

I am currently making a program for my school project, it is a fast food order calculator, my problem is that I have to be able to display the table inside the JFrame in Main, if I add “frame.add(table);” inside Main, nothing happens. Any help would be appreciated, thank you! } Answer Add frame.add(JScrollPane(table)); Change frame.add(label); to frame.add(label, BorderLayout.NORTH); Move

JFrame ending in some time

Whenever I run my code it ends in a few seconds. Why? This is the Main file: This is the GameWin file: When I try to run this code it shows running and then the code ends with exit code 1 which is good, but it just ends without showing the window. Is there something wrong with my JRE or

How to clear a JFrame?

I’m still a noob to Swing classes and I wanted to clear the screen after the user activates a button. I have used the following and it didn’t really do anything. Answer you should use it this way

How to make an app using swing that only uses 1 JFrame?

I am making an app or (something.exe). I want to make a class that will serve as my main frame. That is because I don’t want to create new frame for each class that I will make. I want my class MainMenu to have the Frame of MainFrame where I can put buttons and etc. Answer Make use of Model-view-controller

Is there a way to hide all elements in JFrame

I’m currently working on Java application and I’m using JFrame and inside of JFrame i have some buttons, labels and textfields. I’m in need of hiding all the elements that are in JFrame. I don’t need to hide JFrame itself, only the elements in it so I can display some others. Is there a way to hide them all without

Why it will still appear “Incorrect account or password or user type” after I login successful´╝č [closed]

Closed. This question needs debugging details. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for Stack Overflow. Closed 8 months ago. Improve this question I’ve tried but just can’t figure out why, thanks for helping if there is any solution for this JFrame. Answer it seems an incorrect logic. try return

Advertisement