Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
jframe
- Page 1
Re: JFrame/JDialog and Paint
Programming
Software Development
14 Years Ago
by JamesCherrill
JFrame
has a paintComponent too. You can use this to paint whatever you want as the background for that
JFrame
. Check that everything inside the
JFrame
has setOpaque(false) if any controls are obscuring the background.
Jframe help
Programming
Software Development
17 Years Ago
by bebelove80
…...is it possible to do such a thing with a
jframe
? I've set up my frame layout with the design… I'm supposed to do. I've tried reading some
jframe
tutorials, but none seem to really answer my question or…
Re: Jframe help
Programming
Software Development
17 Years Ago
by masijade
Use a
JFrame
only for the "main" dialog. Use a JDialog (or better yet a JOptionPane) for the "popups". Read the API docs for JDialog and JOptionPane (and JOptionPane and its "finished" methods are the way to go here).
JFrame
Programming
Software Development
16 Years Ago
by orcboyx
Hello all, Does anyone have a good tutorial that explains how
JFrame
works and how it can be implemented?
Re: JFrame
Programming
Software Development
16 Years Ago
by Alex Edwards
[url]http://java.sun.com/javase/6/docs/api/javax/swing/
JFrame
.html[/url]
Re: JFrame?
Programming
Software Development
13 Years Ago
by stultuske
JFrame
has nothing to do with JOptionPane. a
JFrame
can be used to create your own user screens, so yes, also a 'dialogbox' with as many input fields you need, in the layout you want it to be shown in. [URL="http://docs.oracle.com/javase/tutorial/uiswing/"]This[/URL] would be a good place to start learning how to create such screens.
JFrame Disappears when Textfield added!
Programming
Software Development
10 Years Ago
by umaima_1
…(new ActionListener(){ public void actionPerformed(ActionEvent e){
JFrame
cr = new
JFrame
(); cr.setVisible(true); cr.setSize(600,200);…b4.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent e){
JFrame
cr = new
JFrame
(); cr.setVisible(true); cr.setSize(300,100); cr…
Re: JFrame Disappears when Textfield added!
Programming
Software Development
10 Years Ago
by JamesCherrill
That code is completely unreadable - blocks that go on forever, no comments, no indentation... But as far as I can see the order of creating the frame is maybe wrong and missing steps. You should: create the
JFrame
add all the components pack(); the
JFrame
(couldn't find this in your code) finally, make it visible.
JFrame not showing up
Programming
2 Years Ago
by Wafflez
…swing.JTextField; public class Login{
JFrame
frame = new
JFrame
(); JButton loginButton = new JButton… * * @author cktas */ public class NewJFrame extends javax.swing.
JFrame
{ /** * Creates new form NewJFrame */ public NewJFrame() { …
Jframe appears with different size
Programming
Software Development
7 Years Ago
by Saboor880
…which is running perfectly. But i am facing problems with
jframe
size on different machines. I have monitor of 'Gateway…shifted it on laptop of 'hp' company then my
jframe
and its child components appears very small. For example …and labels) appears very small. Similarly I have a
jframe
named Sale.java. I have set its property resizeable(false…
Re: Jframe does not remember it' s position after minimizing
Programming
Software Development
14 Years Ago
by amit.hak50
… = new JTextArea(10, 35); JScrollPane jscrollpane = new JScrollPane(ta);
JFrame
f = new
JFrame
("JScrollPane"); f.setUndecorated(false); f.setLocation(new…
Re: JFrame and JPanel
Programming
Software Development
9 Years Ago
by Violet_82
… of CreateFrame /*CreateFrameTest.java*/ import javax.swing.
JFrame
; public class CreateFrameTest{ public static void main(String… args){ CreateFrame createFrame = new CreateFrame(); createFrame.setDefaultCloseOperation(
JFrame
.EXIT_ON_CLOSE ); createFrame.setSize( 300, 200); createFrame.setVisible( …
JFrame from JApplet not opening in Google Chrome
Programming
Software Development
12 Years Ago
by Kremlin
…I upload it. Here's the code for the
JFrame
I'm trying to create: import java.awt.*; import… null; phpMain = new PHPHandler(); showGUI(); } public void showGUI() { final
JFrame
frame = new
JFrame
("Schedule"); frame.setLocationRelativeTo(null); frame.setDefaultCloseOperation…
JFrame.DISPOSE_ON_CLOSE
Programming
Software Development
11 Years Ago
by matthewborgcarr
…attempt it works fine; it closes the
JFrame
and opens the login
JFrame
. However if the users clicks on …what I want is to always close the main
JFrame
when the user clicks the mentioned button. To close…frame I am using the following code: mainPanel.setDefaultCloseOperation(
JFrame
.DISPOSE_ON_CLOSE); And in the action performed I am using…
JFrame showing nothing.
Programming
Software Development
11 Years Ago
by chdboy
I'm not able to see content on
JFrame
,when
JFrame
shows up. import java.awt.*; import javax.swing.*; … in another class which extends Frame
JFrame
newframe = new
JFrame
("Color Frame"); newframe.setDefaultCloseOperation(
JFrame
.EXIT_ON_CLOSE); GraphicUse gu = new GraphicUse…
Re: JFrame and JPanel
Programming
Software Development
9 Years Ago
by Violet_82
…import java.awt.GridLayout; public class CreateFrame extends
JFrame
{ //create new JPanel private JPanel panel; private…(String[] args){ CreateFrame createFrame = new CreateFrame(); createFrame.setDefaultCloseOperation(
JFrame
.EXIT_ON_CLOSE ); createFrame.setSize( 300, 200); createFrame.setVisible( true …
Re: JFrame.DISPOSE_ON_CLOSE
Programming
Software Development
11 Years Ago
by JamesCherrill
Becuase the
JFrame
disposes correctly the first time, that shows the mainPanel variable correctly refers to that JPanel. Then you create a new
JFrame
for the second user, but the dispose doesn't work. So I wondered: is mainPanel still referring to the first JPanel, or do you update it to refer to the new
JFrame
you just created?
Re: Jframe appears with different size
Programming
Software Development
7 Years Ago
by JamesCherrill
…. You use a layout manager to add these to the
JFrame
according to where you want them to go (top, bottom…, etc). The Layout Manager then sets the size of the
JFrame
to fit your components according to the layout you wanted…
JFrame Won't Render Properly
Programming
Software Development
16 Years Ago
by c0dex
…I have decided to do, is have a pretty looking
JFrame
pop up informing the user of network usage when these…://www.brianmartinson.com/files/yes_filetransfer.png]screenshot[/url]) If the
JFrame
's .setVisible(true); call is made with the "…but that doesn't seem to help (probably because the
JFrame
call is on the same Thread). Any thoughts on what…
JFrame reloading ContentPane
Programming
Software Development
15 Years Ago
by bensjomic
….event.*; import javax.swing.*; /** * * @author Gebruiker */ public class Main extends
JFrame
{ public Main() { } //Container contentPane; public void changeRoot() { Container test = this…
Re: Jframe and panels
Programming
Software Development
15 Years Ago
by sneaker
… two = new JPanel(); two.setBackground(Color.YELLOW);
JFrame
f = new
JFrame
(); f.getContentPane(); //the layout makes the panels stand…setTitle("MY FRAME"); f.setResizable(false); f.setDefaultCloseOperation(
JFrame
.EXIT_ON_CLOSE); f.setVisible(true); } } [/CODE] Hope this…
JFrame/JDialog and Paint
Programming
Software Development
14 Years Ago
by sciprog1
…should be able to change the background color of the
JFrame
randomly in an open ended loop. When I then…other option in the JComboBox, the background color in the
JFrame
should change to some other fixed (not open ended)… combination. Can this be done in a
JFrame
/JDialog without using a JPanel(which has paintComponent())? If anyone…
JFrame with KeyListener
Programming
Software Development
13 Years Ago
by Erlendftw
…have a problem. I googled up KeyListeners for
JFrame
, as they didnt work as usual, and i… found out that when using KeyListeners with
JFrame
you have to set focus, right? Well.…java.awt.event.KeyListener; import javax.swing.
JFrame
; public class BoxWorld extends
JFrame
implements KeyListener{ public BoxWorld() { setFocusable(…
JFRame is not showen after button is clicked
Programming
Software Development
13 Years Ago
by KSBeyaz
….PUTFIELD; public class Hangman { boolean found = false;
JFrame
frm = new
JFrame
("Game Hangman"); private JPanel pnl0= new JPanel…,BorderLayout.SOUTH); frm.pack(); frm.setVisible(true); frm.setDefaultCloseOperation(
JFrame
.EXIT_ON_CLOSE); frm.setPreferredSize(new Dimension(1000,1000)); } public static…
JFrame Question
Programming
Software Development
13 Years Ago
by Yarra
… { public static void main(String args[]) {
JFrame
frame = new
JFrame
(); frame.setSize(850,850); frame.setTitle("Choose… YOUR Features?"); frame.setDefaultCloseOperation(
JFrame
.EXIT_ON_CLOSE); Face1 Component = new Face1(); Hair1 Component2 = …
Re: JFrame.DISPOSE_ON_CLOSE
Programming
Software Development
11 Years Ago
by matthewborgcarr
no the mainPanel is still referring to the first
JFrame
. How can I update it to refer to the new
JFrame
? Thanks
Re: JFrame.DISPOSE_ON_CLOSE
Programming
Software Development
11 Years Ago
by matthewborgcarr
In the class before all the methods I am using this code:
JFrame
mainPanel = new
JFrame
("FlexBox Quotation"); Container conn; Now in the method where I am "constructing" the GUI/Frame, I have the following: conn = new Container(); conn = mainPanel.getContentPane(); mainPanel.getContentPane().revalidate();
JFrame and JPanel
Programming
Software Development
9 Years Ago
by Violet_82
… application with a few buttons. First question is about the
JFrame
and JPanel. From what I remember - and what I found… online - the
JFrame
is at the top level of the hierarchy, but do… I put my GUI components directly onto the
JFrame
(providing my class extends the
JFrame
of course)? It's a little comfusing…
Re: JFrame and JPanel
Programming
Software Development
9 Years Ago
by JamesCherrill
…, actually there are some panels that are part of every
JFrame
, and one of those is where your components are placed… just think of it as adding components directly to the
JFrame
). You use JPanels to organise and simplify your layout, eg… then don't use them. ps You shouldn't extend
JFrame
unless you have some particular reason to do so. You…
Re: JFrame from JApplet not opening in Google Chrome
Programming
Software Development
12 Years Ago
by NormR1
What is the difference between the
JFrame
that works and the one that doesn't? Strange there is no error message for the one that does not work.
1
2
3
17
Next
Last
Search
Search
Forums
Forum Index
Hardware/Software
Recommended Topics
Programming
Recommended Topics
Digital Media
Recommended Topics
Community Center
Recommended Topics
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2025 DaniWeb® LLC