I have a JFrame that I want to add a menu bar to and then have that JFrame automatically open in fullscreen. If I just make a JFrame and set it to fullscreen with f.setExtendedState(f.getExtendedState()|JFrame.MAXIMIZED_BOTH ); that works fine: However, once I add a JMenuBar to that JFrame it will no longer open in fullscreen: What could be the cause
Tag: jframe
In the Eclipse WindowBuilder editor, the Design tab isn’t showing anything
When I create a jframe within a java project it shows me all the code in the Source part but when I go to Design it shows nothing? Would like some help on how to get the whole interface where you customise the GUI. Answer That’s a known issue of the Eclipse 2020-09 release which is already fixed (see Eclipse
JFrame Image Update on click of image
tldr; How do you use a MouseEvent on a JFrame object(specifically JLabel) to update the displayed image in the JFrame I am trying to create a program where an image is broken into tiles and on click of one of those tiles, the program moves the tile to the open space in the image. (See Sliding Puzzle for more information).
How can I set up a JFrame button to open another JFrame, and then receive information once the second jframe is closed?
This is part of a project for school, and I’m stuck and need someone to bounce ideas off of. I have a game where there is an option to sign up or sign in for a machine-local game so a record can be kept of the person’s scores. The game is run from a base GUI JFrame, and I want
How to draw polyline with negative coordinates in java [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 2 years ago. Improve this question I want to draw polyline with positive and negative coordinates. e.g. 125,66 126,62 -128,59 -127,55 -125,51 -124,47 -122,43 -121,40 -119,38 -118,36 These are the sample
How I can make my program generate a new random number?
So I tried closing the window and reopening it afterwards so the whole program would start from the beginning. That didn’t work. Neither does Revalidating the frame (f.revalidate(), f.repaint()).. I’ve tried looping the if-functions with a while loop, setting the boolean to false when the number has been guessed. But that just resulted in an endless loop of testing if
Can I acces variables and/or methods of the class a JFrame was created in from the panel?
shortened code: Is it possible to directly access obj from panel? If yes: How? Thank you in advance for your help. 🙂 Answer No; Not without passing the reference to object to the panel.
How do i write a code to display every letter in every JPanel, and how do I rotate. (JFrame, NetBeans)
I’m new to Java, and I was assigned in my class to develop a code for the following question, I was only able to do the design, after that I didn’t know how to continue adding the actions to every button. This is the question: https://www.chegg.com/homework-help/questions-and-answers/write-java-application-creates-frame-similar-one-shown–four-letter-word-shown-four-panels-q52352988 If anyone has ever solved it, please share it. Thanks for help in advance!
Why won’t the background of my JFrame become black?
I’m working on a school project and I’m having trouble changing the background colour. For some reason it keeps showing up as the default grey colour instead of black. Answer You are replacing default content pane with yours one. so change background color after replacing content pane. OR do
JScrollPane doesn’t show up in JFrame
there. I’m writing a GUI chat client which sends message to the server and receives echoes from the server. The top half of the client JFrame contains a JTextArea wrapped in a JScrollPane which is placed under the menubar. This JScrollPane is responsible for receiving responses from the server which receives messages from a client and broadcast it out to