jframe Questions
2
Solved
I am writing a java application that takes advantage of a dual monitor set up. I have two windows:
Window 1 - Main GUI
Window 2 - Full Screen on Second monitor
My Problem: The second window onl...
Weathercock asked 11/7, 2014 at 18:29
9
I want to set the maximum length of a JTextField, so that you can't enter more characters than the limit. This is the code I have so far...
textField = new JTextField();
textField.setBounds(40, ...
Wintergreen asked 13/4, 2012 at 7:22
1
I am making a top down 2d survival game where the player must dodge projectiles from enemies in order to survive, but I've run into an issue that may, slightly influence the gameplay of my first re...
Midian asked 15/1, 2021 at 11:56
6
Solved
2
Solved
i'm new here. Hope you will be able to help.
Problem:
Problem with displaying Animation on JFrame. Seems I miss/don't understand enough how Java's graphics works.
Global idea:
Lets say I want mak...
Mongolism asked 28/6, 2013 at 21:29
2
Solved
The difference I see is (running on JDK 1.7):
setVisible(false), invokes componentHidden but not windowClosed (The API states only on dispose() so it's OK even if it irritates me)
but
dispo...
Adynamia asked 12/1, 2016 at 12:25
8
Solved
I have in a JFrame some components that I want
to refer into another JFrame and I want
to get them by name and not
do public get/set methods for each.
Is there a way from Swing to get a component ...
2
Solved
How do you add a shadow to a undecorated jframe?
From what I found online, you might be able to add the jframe to another black translucent window to give a shadow effect.
Or somehow apply someth...
1
I've discovered an issue with Windows 10 and Java.
JFrame frame = new JFrame();
frame.setVisible(true);
When I create a new JFrame and show it on the screen, it normally should have the screen c...
Bohunk asked 8/1, 2019 at 16:39
2
Solved
Does anyone know any way I can play an .mp4 video file in a JPanel?
I have tried JMF with .avi file but found no success and now I'm baffled and frustrated at how such a simple task of playing a vi...
5
Solved
I have a game of chess.
I have written 3 classes.
1st if for game. (chessboard, pieces, and so on)
And another one is for menu. (buttons like new, open, set time)
Both of them use JFrame.
I would...
Wareroom asked 25/6, 2013 at 0:21
4
Solved
I have a simple GUI:
public class MyGUI extends JFrame{
public MyGUI(){
run();
}
void run(){
setSize(100, 100);
setVisible(true);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);// maybe ...
Patin asked 30/4, 2013 at 8:58
4
Solved
I want to display variations of the same image in the same JFrame, for example display an image in JFrame, then replace it with gray scale of the same image.
Leucas asked 26/10, 2009 at 19:8
3
Solved
I have a simple question. I have a project made with javax.swing.JFrame. I would like to iterate through all the objects that i Have added in the Jframe. Is that possible, how can I do it?
5
Solved
I have a main JFrame that has all kinds of panels in it for different functions and people can calculate things in them. I want to open a new JFrame when the user hits the first calculate button an...
5
Solved
I have a JFrame with a Title. I want center align the title, so that it appears in the middle of the JFrame's title.
Thanks.
4
I have created a frame x1 which has a panel p1. When x1 is loaded, checkboxes are added dynamically to p1. The number of checkboxes added to p1 depend on the number of data values in the database t...
3
Solved
I would like to know how to get a transparent JFrame in the latest version of Java.
Currently, you can only use
<JFrame>.setOpacity();
if the frame is not decorated.
I have no use for ...
Ventral asked 16/9, 2016 at 19:18
8
Solved
I have a JFrame and want to remove the maximize button from that.
I wrote the code below, but it removed maximize, minimize, and close from my JFrame.
JFrame frame = new JFrame();
frame.add(kart)...
Azotobacter asked 11/4, 2011 at 18:0
8
Solved
I don't get how can I employ this code:
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
to close the program with the x button.
12
Solved
I have a dual monitor config and I want to run my GUI in a specific monitor if it is found. I tried to create my JFrame window passing a GraphicConfiguration object of my screen device, but it does...
Bookplate asked 7/1, 2011 at 16:13
3
Solved
6
Solved
I just wrote a simple code where I want a textfield and a button to appear on the main frame, but after running all I see is the textfield.
If I write the code of the button after the textfield th...
Oddfellow asked 28/12, 2011 at 20:12
5
Is there a way to set the insets of a JFrame?
I tried
frame.getContentPane().getInsets().set(10, 10, 10, 10);
and
frame.getInsets().set(10, 10, 10, 10);
but none of them seem to work.
6
© 2022 - 2024 — McMap. All rights reserved.