JFrame 1 « JFrame « Java Swing Q&A





1. How can jFrames be used inside of JavaFX?    stackoverflow.com

I just saw a article on swing being used in JavaFX. How can an application that uses a jFrame to display graphics be ported into JavaFX? Also, will the ...

2. Java JFrame question    stackoverflow.com


I was wondering if anyone could help me on using NetBeans....
I just need one piece of advice.
Here's the problem:
When I create a new Java Desktop App I ...

3. JFrame in Java    stackoverflow.com

I am using a JFrame as a pop-up from a main frame, where the user is supposed to enter some information and then press OK. But the problem is that once ...

4. java JFrames    stackoverflow.com

hello every one? is there a way i could make a button display a form only once? that is i have two jframe(courses and main page);at one jframe (main page),i have a jbutton ...

5. Jframe inside C# form    stackoverflow.com

I'm trying to add a Java JFrame into a container inside a C# form. The JFrame I have is implementing a AppletStub aswell, and I've used IKVM to do the interopting, ...

6. Link between two JFrames    stackoverflow.com

link between two JFrame using JMenu i have an application where i have to move to another frame by clicking a menu. for example, on a file menu, i click on add ...

7. Best way to add a String in a JFrame    stackoverflow.com

which is the best way to add formated string in jframe. Previously I was trying to add jlabel

8. Java JFrame Form    stackoverflow.com

I'm try to implement my program by using JFrame Form on Netbean. Then when i use my main frame to popup other frame and i close that frame, my main frame will ...

9. JFrame is not acting as expected!    stackoverflow.com

This is my first time using a JFrame. I can't get the window to display the text areas I've nested inside the JFrame. I am trying to get the text field ...





10. Can I set two different look and field on one JFrame?    stackoverflow.com

Hey Guys
I want to set two different look and feel on one frame.
I have two different panels in that.
i want to set two different look and feel for both.
Can I ...

11. Java SystemTray and JFrame    stackoverflow.com

I am work on desktop application in which I required a functionality which will take an snap of desktop and then will show it on a Jframe to user in 150X150 ...

12. Java: I can't interact with my JFrame    stackoverflow.com

I have a java application (1.4.2) that uses 2 JFrames. The first is Modal=true and appears on top of the second JFrame. The first JFrame allows the user to "open" a file. ...

13. NetBeans program linking    stackoverflow.com

1 main program 2 JFrame programs. How do I use the main program to call the JFrames to run during the main programs execution chromatically? (One at a time, one pops up ...

14. what is the difference between JFrame and FramView in Java?    stackoverflow.com

1- what is the difference between JFrame and FramView in Java ?? 2- when I create New Desktop Application with NetBeans , FrameView is created and when I put any component ...

15. Java tournament bracket    stackoverflow.com

I'm working on a java application which requires the creation of a tournament bracket to take in event results, and I would like to display this tournament in a JFrame if ...

16. How can I preset a JFrame?    stackoverflow.com

using an external library which creates a JFrame window, there is a way to preset its l&f before showing it? also something like accessing its own thread could be a solution ...





17. Should one inherit GUI JFrames?    stackoverflow.com

I've a JFrame 'A' and I'd like to provide a very similar one, but with extra buttons, and different functionality. I was wondering if I should inherit 'A' and then overwrite ...

18. JFrame and why stay running    stackoverflow.com

Why if I create a JFrame then the program still runs until (i.e) I close it with the small "exit button" of the window? I looked for this answer and I failed. ...

19. Is it possible to create different look for a JFrame in Swing?    stackoverflow.com

is it possible to create different look for a frame in java. i mean can v extend the core JFrame class and override it so v can create different look n ...

20. Java JFrame Question    stackoverflow.com

import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;

public class tictac2 implements ActionListener{
    static boolean blue = true; //used to keep track of turns. if true, blue's turn, else, red's turn. Blue ...

21. Java Custom JFrame    stackoverflow.com

I want to draw a custom version of a JFrame. Is is possible to extend to a JFrame and draw over it? I've looked everywhere and can't seem to find a solution. ...

22. Why is my JFrame not showing?    stackoverflow.com

I'm pretty sure I've done it this way before, but for some reason, the JFrame won't show up when I run it.

    JLabel originalString =  new JLabel("Original ...

23. Java Jframe Not showing up    stackoverflow.com

I have a question. I created a new project with netbeans and have main.java and i created a jframe that i called GUI.java. Now when I hit F6, my GUI.java dosen't ...

24. Creating a two box JFRAME HELP!    stackoverflow.com

This is what I currently have but its not not showing the results in two textareas.. Right now all it shows is one textarea with Odd numbers only. I'm not sure why ...

25. Java 6, JFrame stuck alwaysontop    stackoverflow.com

This issue only seems to occur since I upgraded from 1.5 to 1.6 The main JFrame, randomly seems to get stuck infront of every other application in windows. Even another JDialog popping up ...

26. setMaximumSize not working in java    stackoverflow.com

I hava a java program with a JFrame I am using absolute positioning here is my main function

public static void main(String[] args) {
    ape Ape = new ape();
   ...

27. Console within a JFrame    stackoverflow.com

I want a scrollable console within a JFrame, so people can see messages while using the GUI. I'm currently using a JLabel, but this obviously only allows one message at a time. ...

28. Flashing JFrame    stackoverflow.com

I would like to create a JFrame with two specifal features:

  1. JFrame should not grab focus while maximized from minimized state.
  2. When a JFrame created or became maximized from minimized state, it should ...

29. What is the J in JFrame?    stackoverflow.com

What is the 'J' in JFrame in Java?

30. How to remove JFrame and show other ons after X seconds? (Java)    stackoverflow.com

When the user finishes to use my app, a "Thank You" screen is shown. My problem is that I want to hide this screen after 5 seconds, and show the "Welcome" screen ...

31. Why are Frames and JFrames set to invisible by default?    stackoverflow.com

Does anyone know the rational for Java Frames and JFrames being set to invisible by default? i.e. you have to call myFrameObject.setVisible(true) or you end up with an invisible application interface. This has ...

32. How to place a JasperReport chart on JFrame?    stackoverflow.com

Is there a way to display a JasperChart on JFrame instead of JasperViewer? I am thinking to make a chart similar to green resource chart on Windows Task Manager interface. Thank you

33. how to connect my JFrame to my Dotsgame program    stackoverflow.com

When I enter my details in the JFrame and click enter the dots game to doesn't popup code for JFrame

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {      ...

34. Java IOStream Arrays JFrame    stackoverflow.com

I have to create a CD inventory program for my first Java class. The book is poorly written and extremely verbose. I have created 4 frames to handle each ...

35. How can I make an application using a single JFrame?    stackoverflow.com

I want to create an application with operations like "add student", "view student", "delete student", etc. I'd like to use a single JFrame. When the user chooses one of these operations, ...

36. Swing circular JFrame    stackoverflow.com

is it possible to make a circular JFrame without the need to the Class AWTUtilities i mean in jdk 6 .. is it possible??

37. need to init the JFrame    stackoverflow.com

I dont know how to init the JFrame windows. What I need to write to init im? I have created at the main this:

Panel Panel=new Panel();

Panel.init();

JFrame frame = new JFrame("Shape Project");
frame.add(Panel);
frame.setResizable(false);
frame.setSize(new Dimension(1200, ...

38. Creating a superior JFrame over another    stackoverflow.com

I have two JFrames. Both are visible at same time. One JFrame takes the whole screen..its just plain white. (it is acting as a background). And other JFrame is a small box ...

39. Why is Swing JFrame always reachable?    stackoverflow.com

How come JFrame instances are always reachable within a Swing application? Won't that prevent it from being garbage collected?

JFrame frame = new JFrame();
System.out.println(Window.getWindows().length); // says '1'
Calling dispose() doesn't help. It is ...

40. Initializing a JFrame    stackoverflow.com

This is probably an easy question, but hey, i'm a beginner. So I've created a program that calculates some stuff, and it's running in the console at the moment. I decided to ...

41. How to synchronize a Jframe show in others computer is same as host?    stackoverflow.com

My project having a Jframe that showing some gui, the gui will represent a user or agent to move into the map. My Jframe will keep refreshing to make the user ...

42. JFrame questions    stackoverflow.com

I have some questions regarding JFrame. Here's the scenario: I have made some object classes in java and I want to make the GUI for these objects. So i created 2 JFrames. ...

43. Slideshare presentation on Jframe    stackoverflow.com

Is it possible to view a slideshow of slideshare.com in a container of a JFrame in Java? If yes, is the official API allows it?

44. if it possible reconfigure a jframe    stackoverflow.com

jframe to default show rectangle.
i want to know if it possible we show it similar to a circle? and how?

45. How to get all elements inside a JFrame?    stackoverflow.com

I have this code to get all the elements I need and do some processing. The problem is I need to specify every panel I have to get the elements inside ...

46. JGraph in a JFrame    stackoverflow.com

I want to draw some graphs including vertices and edges in my application. I found that JGraph is a good library for plotting graphs. I went through some online sources about ...

47. Java, JFrame: getWidth() returns 0    stackoverflow.com

setExtendedState(getExtendedState()|JFrame.MAXIMIZED_BOTH);
setResizable(false);
setUndecorated(true);
System.out.println("--------> "+getContentPane().getWidth()); //----> 0 why is this happening?
I'm trying to determine the size of a JFrame. I've searched on google and checked the documentation and I still don't know why it ...

48. Internal JFrames    stackoverflow.com

I want to know how to show an internal frame in swing. That means,when a JFrame is needed, normally what I do is,

new MyJFrame().setVisible(true);
Let's say the previous form should be ...

49. Execute a JFrame program    stackoverflow.com

how to execute this program?

// Resolve class BorderLayout
import java.awt.*;
// Resolve class JFrame and JButton
import javax.swing.*;
// Definition of class FrameWithBorderLayout

public class FrameWithBorderLayout extends JFrame {// Attribute

    private JButton buttonEast; ...

50. Why doesn't my JFrame show up?    stackoverflow.com

I'm trying to make a solved sudoku puzzle show up in a window with 81 boxes. I did this:

import java.awt.GridLayout;
import java.awt.*;

import javax.swing.JFrame;
import javax.swing.JLabel;


public class GraphicSolver extends JFrame {

GraphicSolver(int[][] spelplan) {

  ...

51. How to get JFrame as function argument in java?    stackoverflow.com

I wanted to make a different function to make menubar for java application.
in menubar function frame.pack() in action listeners and frame.setJMenuBar statements are required. so how can we pass ...

52. How to check if one graphic is overlapping another?    stackoverflow.com

I've looked on Google and still couldn't find anything. I had an idea for a simple Snake type game or like a 'Coin Collection' game using 2D graphics, but ...

53. JFrame attached on the side of another JFrame    stackoverflow.com

I'm trying to attach a JFrame to another JFrame, it works by setting the coordinates of the 2nd jframe to the right edge of the first. But it doesn't feel like ...

54. Is there a way to use commandline within a JFrame GUI?    stackoverflow.com

So, I made a jar file which runs a class that has JFrame, panel and a button. Once the button is clicked it runs the main method of my class that runs a ...

55. JFrame doesn't show up as I wanted    stackoverflow.com

I really have trouble with this JFrame. I have a class that extends JPanel and I created in the constructer a JFrame. But After drawing some lines under my JMenu, another ...

56. What is the best practice for setting JFrame locations in Java?    stackoverflow.com

I have a (somewhat philosophical) question relatively to Swing, or to GUI programming in general. Are there recognized best practices on where to locate the JFrames used in the application ? ...

57. Working with 2 or more frames    stackoverflow.com

I have about 3 frames in my java swing application. What it the correct way how to handle with these frames? I mean some pattern or something else. Now I have ...

58. Compiles and runs but its not there    stackoverflow.com

I am trying to run my JFrames from a package folder (which works and has been setup correctly). The problem is that it compiles and runs but I cant see anything ...

59. Java - What's wrong with this simple program?    stackoverflow.com

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;

public class Test extends JFrame{

    JLabel label = new JLabel("Leann will come again");
    JButton yesButton = new JButton("Yes");
 ...

60. paintComponent () never executes on a JFrame    stackoverflow.com

import javax.swing.SwingUtilities;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.BorderFactory;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.*;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseMotionListener;
import java.awt.event.MouseMotionAdapter;
import java.awt.geom.*;
import java.util.*;

public class test1 extends JFrame implements MouseListener  {
    private JPanel JP = ...

61. JFrame doesn't appear in Netbeans    stackoverflow.com

JFrame doesn't show up in Netbeans. When I try to use it, I create a new proyect and then, I click on "Source Packages" (at the left side beneath the name of ...

62. I want to get words in a JFrame2, go back to JFrame1 and then go to JFrame3 with these words. How can I do it?    stackoverflow.com

Well, I'm having this newbie problem right now. I have 3 JFrames. JFrame1 opens JFrame2; JFrame2 gets the words and then re-opens JFrame1; JFrame1 opens JFrame3 with the words taken in ...

63. drawOval in the JFrame    bytes.com

64. How to view a JFrame in netbeans?    forums.netbeans.org

Hi, Iam very new in Java. I created a new Java desktop application and inserted a button at my AppView.java. At the action performed section of my button I wrote;

65. How to create a Customerized JFrame Form with viewable mode    forums.netbeans.org

Normally, when we create a new JFrame form from NetBean build-in template, the code starts with this: public class NewApplication extends javax.swing.JFrame { and we can view "visually" in selecting View ...

66. Troubles getting JFrames to talk    forums.netbeans.org

Greetings everyone. I'm new to Java and NetBeans but really intrigued on learning the material. I've created some JFrame forms and I'm trying to get them to link together but I ...

67. JFrame newbie questions    forums.netbeans.org

68. JFrames    forums.netbeans.org

i have 2 Jframes from 2 different forms. There is one button in JFrame1. When it clicked, it will show the JFrame2. what command should i use to close JFrame1 when ...

69. JFrame Form width Locked    forums.netbeans.org

Hi I am using Netbeans 6.7.1 and while setting up a form the width has locked and I cannot change the size either dragging the form across or changing the settings ...

70. 3rd Party Programs in a Jframe?    forums.netbeans.org

Hi, just curious if this is possible and if so how it would be done. I want to execute a 3rd party program, say iTunes, in a Jframe so that it ...

71. How do I move my code outside my JFrame    forums.netbeans.org

I wan to put some of my code outside the JFrame. In a simple java I just have to write: class AA_TRY extends My_Validator { etc... public static void main(String[] args) ...

72. JFrame Form code generation    forums.netbeans.org

I would like to ask if there is a way to modify the way NetBeans generate the code for JFrame while designing it, specificaly the order. As you know NetBeans generates ...

73. JFrame form code generating    forums.netbeans.org

I would like to ask if there is a way to modify the way NetBeans generate the code for JFrame while designing it, specificaly the order. As you know NetBeans generates ...

74. JFrame doesn't show up .. ?!    forums.netbeans.org

fluturel Joined: 13 Jul 2010 Posts: 13 Posted: Wed Jul 14, 2010 11:10 am Post subject: JFrame doesn't show up .. ?! I'm working on a NetBeans module ...

75. JFrame question    forums.netbeans.org

I have an SingleFrameApplication with: Code: public RamanView(SingleFrameApplication app) { super(app); WindowListener wl = new WindowListener(){ public void windowOpened(WindowEvent e) {} ...

76. RESOLVED - Issue with JFrame GUI    forums.netbeans.org

Hi All, I am building a JFrame and dragging data tables from the server explorer onto the form to auto create the tables. All is well until this point. I deleted a table I no longer wanted to use and deleted the nDatatable.java file from the project explorer. However, two references remain to this file as part of the auto generated ...

77. JFrame out of scope?    forums.netbeans.org

Hi Everyone, I'm semi-new to both Java and Netbeans and have a question about creating JFrame forms using the GUI, then accessing them in code. If I right-click my package, then click New then JFrame form, Netbeans creates a form and I can see in the properties that it's called "frame1." However, no-where in the code can I access frame1. It ...

78. JFrame preferredSize    forums.netbeans.org

Hi everybody, why preferredSize of a JFrame isn't settable via properties window, in the GUI BUilder? It is gray, and if you open the editor the button 'ok' does not show. Thanks in advance Agostino How to reproduce: create new java project and add a JFrame form, go to the property window and try to modify the preferredSize.

79. attaching crystal report to jframe    forums.netbeans.org

hai my friends i am new to java,netbeans i have one crytstal report in c:\abc.rpt(connected to oracle working in .net properly") how i can attach this report to a jframe and view report with data in a click event of button in jframe1 your quick response with valuable code will be highly appreciated ( try to give me complete code) regards ...

80. New JFrame At RunTIme NB 7.0    forums.netbeans.org

Hello! I jst satarted using NB GUI builder with Netbeans 7.0 I want to know How A new JFrame could be opened at run TIme? e.g When i display a menu with buttons,at click on any button another jframe should open.How can i do this? Thnx in advance -- View this message in context: http://netbeans-org.1045718.n5.nabble.com/New-JFrame-At-RunTIme-NB-7-0-tp4392633p4392633.html Sent from the Netbeans IDE Users ...

81. Generated warning in JFrame code    forums.netbeans.org

Hi, I've just started with NetBeans. I'm a little bit confused about following warning in code: This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor. To what this message refers? Is it forbidden to place any code within the constructor? ...

82. help for JFrame    forums.netbeans.org

sorry, this is my first post, i've been using netbeans for my project and i have some question regarding JFrame: 1. how to disable auto change the shape of the design component 2. yesterday i updated the netbeans, today, when i open the JFrame java, there is no design and source button list on top left of the source code. i ...

83. GUI questions when 'maximising' JFrame    forums.netbeans.org

I have the following code: citationsFrame = new CitationsFrame(); screenSize = Toolkit.getDefaultToolkit().getScreenSize(); width = screenSize.getSize().width; height = screenSize.getSize().height; citationsFrame.setSize((width * / 10, (height * / 10); citationsFrame.setLocationRelativeTo(null); citationsFrame.setVisible(true); This works. But I have two problems. I have (when it is unexpanded) a centred JButton on it. But the x position stays the same. The y position is justly updated. How can ...

84. Missing GUI elements (jFrame form etc)    forums.netbeans.org

I am running Netbeans 7.0.1 on Vista 32 bit. Sorry if this is a silly question, but I'm having a problem that I'm not experiencing on my Linux machine at work. On the Linux system I can add a Jframe form by creating a new Java Application, then once it is created right clicking on the project and then New-> and ...

85. jframe    forums.netbeans.org

86. JFrame in JSP    coderanch.com

87. Customize JFrame    coderanch.com

88. JFrame Shortcut    coderanch.com

hi krishna, the most obvious problem may be that u r not specifying the classpath in your command. i'm successfully using this in my project. so specify full path/classpath in the command that u r writing in ur batch file. for example contents of one of my batch file lok like - d:\jdk\bin\java -classpath %classpath%;d:\project mainPackage.mainClass so specify path\classpath completely and ...

89. Features in JFrame??????    coderanch.com

90. JFrame in swing    coderanch.com

91. Frame and JFrame    coderanch.com

A frame all by itself is a pretty featureless thing. I admit not seeing a difference when I tested it on my machine. If you refer to the components inside your frame, then maybe you can change the L&F (Look & Feel) to something different. I can post some code to do this if you want.

92. JFrame    coderanch.com

93. Middling The JFrame    coderanch.com

Here is some code with comments that will help you understand what is going on... import java.awt.*; import java.awt.event.*; import javax.swing.*; public class ScreenTest extends JFrame { // Constructor public ScreenTest( String title ) { super( title ); } public static void main( String args[] ) { // Create the frame and set it's size. ScreenTest st = new ScreenTest( "Centered" ...

94. createRootPane method in JFrame    coderanch.com

95. JFrame    coderanch.com

96. Maximise JFrame    coderanch.com

97. JFrame    coderanch.com

98. JFrame    coderanch.com

Well, actually speaking getToolkit should do, would like to c ur code, but anyway heres some sample code u can use... // centers the dialog within the screen public void centerScreen() { Dimension dim = getToolkit().getScreenSize(); Rectangle abounds = getBounds(); setLocation((dim.width - abounds.width) / 2, (dim.height - abounds.height) / 2); super.setVisible(true); //requestFocus(); }

99. JFrame Customization Help    coderanch.com

100. Is JFrame added to JFrame heavyweight or lightweight?    coderanch.com

Thanks, Manfred man, for clearing me the fact asked. But logically it was not clear to me.

the OS link must be created and maintained
OK, but for a link/reference/pointer, why there is a need for peer (from OS)?
The OS functionality can not be changed from within Swing for top level components because of the OS link ...