jframe Questions

3

Solved

My code below create a new array and sends it to chat(jFrame). String info1[]=new String[3]; // username , userid , userid2 are variables info1[0]=username4; info1[1]=""+userid; info1[2]=""+u...
Hostetter asked 1/7, 2013 at 4:26

2

Edit: some sort of refresh is being sent when I drag the borders, I need to figure that out and manually send that same refresh. Please note I have tried using revalidate() and repaint(). When ...
Rattly asked 19/9, 2018 at 11:54

14

Solved

I have created one GUI in which I have used a JFrame. How should I make it Modal?
Eudemonism asked 26/9, 2009 at 15:7

3

Solved

I am having some trouble using the JFileChooser. Whenever I run the program if I click the "cancel" button right away without selecting a file it will display "hello" and if I click open, it will n...
Vibration asked 10/6, 2013 at 23:13

1

Does anyone know of a method or API that supports embedding a native window inside either a Java JFrame or JPanel? I found this previous post: How do I run an external program inside a Java frame...
Molech asked 12/1, 2014 at 14:56

13

Solved

I tried this way, but it didnt changed? ImageIcon icon = new ImageIcon("C:\\Documents and Settings\\Desktop\\favicon(1).ico"); frame.setIconImage(icon.getImage());
Kava asked 27/3, 2013 at 11:18

10

Solved

I am developing a java swing desktop application with NetBeans and I want to set the JFrame to the centre of the screen. from the net I understand that I can use setLocationRelativeTo(null); ...
Texas asked 4/4, 2013 at 13:9

12

Solved

While working with Java, I find it hard to position my main window in the center of the screen when I start the application. Is there any way I can do that? It doesn't have to be vertically center...
Isoprene asked 14/3, 2010 at 15:18

4

Solved

I have a very simple JFrame window that contains one button: No. In the main function I set setVisible(true); my JFrame and in the No button listener I want to close the window so I set the visibi...
Fastening asked 3/1, 2013 at 11:58

5

Solved

What is the main difference between setSize() and setPreferredSize(). Sometimes I used setSize(), sometimes setPreferredSize(), sometimes one does what I want, sometimes the other. What call should...
Loveinamist asked 23/11, 2009 at 15:21

3

Solved

I have a Java project. I have a JFrame with a handler attached to it like so frame.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent evt) { this.setEnabled(true); ...
Samantha asked 11/11, 2010 at 13:17

7

Solved

I am writing a small game, with one JFrame that holds the main game, and another JFrame that displays the score. the problem is, when I am done constructing them, the score JFrame always ends up fo...
Freemasonry asked 13/3, 2009 at 1:36

3

Is there any thing I can do to make my JPanel pack like a JFrame, or do something like that. I want to do this instead of giving it dimensions. Please comment if any addition info is needed. Thanks...
Ashburn asked 6/10, 2014 at 0:43

8

Solved

I have a JPanel full of JTextFields... for (int i=0; i<maxPoints; i++) { JTextField textField = new JTextField(); points.add(textField); } How do I later get the JTextFields in that JPanel?...
Haemachrome asked 16/12, 2008 at 2:21

4

Solved

Currently, I am using the following code to drag and move my undecordated JFrames. private void initialiseGUI(Component component){ //<editor-fold defaultstate="collapsed" desc="code"> com...
Goldi asked 29/6, 2014 at 13:29

7

Solved

I want to put a JButton at a particular coordinate in a JFrame. I used setBounds() for the JPanel (which I placed on the JFrame) and also setBounds() for the JButton. However, they don't seem to fu...
Lifeblood asked 7/7, 2010 at 14:24

4

Solved

I've been looking all over the internet and Can't find an answer. I'm using Eclipse and need to import JFrame from javax.swing. But hovering over the the declaration (which in Eclipse should give ...
Intercalate asked 22/4, 2014 at 2:2

2

I'm using Eclipse 2021-9 version and already have windowbuilder installed. this error happens when I click the designer tab. Can anybody help me?
Mild asked 11/11, 2021 at 11:8

3

I was creating a JFrame for a project and while trying to edit it, the design tab was blank. I've created a test project with everything on default and this "error" still there. Here's t...
Aswarm asked 5/5, 2021 at 2:42

7

Solved

I am using the following code, UIManager.put("JFrame.activeTitleBackground", Color.red); for change the toolbar color in JFrame. But it didn't work. Is it possible to change the color of titleb...
Schoening asked 20/3, 2010 at 12:22

6

Solved

I need some help with a simple java application which makes use of two jframe to get some input parameters. Here's a sketch of my code: //second jframe, called when the button OK of the first fra...
Procurator asked 19/11, 2013 at 10:45

8

Solved

I am creating a JFrame and I call the method setSize(500, 500). Now the desired behaviour is that JFrame should not be resized by user in any condition. Either by maximizing or by dragging the bord...
Accompany asked 3/8, 2013 at 10:12

6

Solved

What is the difference between these two methods - System.exit() and JFrame.dispose()? If we want to close a Java Swing application when a button is clicked, which method should I use?
Seaward asked 13/11, 2012 at 12:3

5

Solved

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 b...
Vertumnus asked 13/7, 2009 at 15:4

6

Solved

Is it possible to make a JFrame that has a transparent background and draw an image on it, so only the image will be visible with no border or background?
Elongation asked 28/3, 2010 at 16:41

© 2022 - 2024 — McMap. All rights reserved.