Skip to content
Advertisement

Tag: jframe

JavaFx equivalent of Swing JFrame

I am learning JavaFX. I have encountered a problem; I cannot figure out what is the equivalent of a Swing JFrame in JavaFX. Is it the Scene or the Stage? Answer The equivalent of a Swing JFrame in JavaFX is the Stage class which extends from Window and can be made visible by calling show() method. The Scene is more

JFrame Image, paint on top of it

I create a frame with an image with this code: That works fine, but now I want to paint something in that opened frame (on top of the image). I’m quite new in Java, and I’ve allready tried to make a class that extends JFrame, with a paint(Graphics g) method in it, but it wouldn’t work, I only see the

Why jframe hides taskbar when maximized?

I’m using setUndecorated(true); and getRootPane().setWindowDecorationStyle(JRootPane.FRAME); in my jFrame. This works great but now when I maximized my frame it spreads all over the window even taskbar is not visible. What can I do to make frame not to hide taskbar? Also when I maximize minimize my frame multiple times the cursor is changed to this <-> which is generally used

Making a JPanel manually resizable

I have a JFrame with BorderLayout as the layout manager. In the south border, I have a JPanel, I want this JPanel’s size to be adjustable by the user, i.e. the user can click on the edge of the border and drag it up to make it larger. Is there any way you know that I can do this? Answer

Java get JPanel Components

I have a JPanel full of JTextFields… How do I later get the JTextFields in that JPanel? Like if I want their values with Thanks Answer Well bear in mind they didn’t get there by them selves ( I think a read some questions about dynamically creating these panels at runtime ) In the answers posted there, someone said you

Advertisement