[nbusers] Re: No interface is opening with my program??

  • From: Benno Markiewicz < >
  • To:
  • Subject: [nbusers] Re: No interface is opening with my program??
  • Date: Wed, 9 Jan 2013 06:49:19 +0100

Yes Scott. I missed that too.

Greetings markiewb

Am 09.01.2013 06:33 schrieb "Scott" < "> >:

Also, it's been a while since I coded any swing, but I thought the setVisible() had to be done AFTER all the components were added to the frame.

Scott Arrowood
Sent from my HTC Thunderbolt

On Jan 9, 2013 12:19 AM, "Benno Markiewicz" < " target="_blank"> > wrote:

Your method which creates the window is never called.

A) Rename your "void testnew" to "testNew", so you create a constructor.

Or
B)
Call "new Testnew().testnew()" from your main method.

Greetings markiewb

Am 09.01.2013 01:38 schrieb "zlloyd1" < " target="_blank"> >:
I am confused here.  :?
I wrote out this simple GUI in NetBeans  7, and when I compile and run it everything works, except nothing happens??  [Crying or Very sad]
This is my code,

Code:
package testnew;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class Testnew{
JComboBox c = new JComboBox();
public void testnew(){
frame();}
public void frame(){
JFrame f = new JFrame();
f.setVisible(true);
f.setSize(400,400);
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JPanel p = new JPanel();
p.setVisible(true);
p.add(c);
f.add(p);}public static void main(String[] args){
   new Testnew();}}


but no new window opens....  [Exclamation]  Can someone please tell me what I am missing here??  [Question]






[nbusers] No interface is opening with my program??

zlloyd1 01/08/2013

[nbusers] Re: No interface is opening with my program??

Benno Markiewicz 01/09/2013

[nbusers] Re: No interface is opening with my program??

Scott 01/09/2013

[nbusers] Re: No interface is opening with my program??

Benno Markiewicz 01/09/2013

[nbusers] No interface is opening with my program??

zlloyd1 01/09/2013

[nbusers] No interface is opening with my program??

bolsover 01/09/2013

[nbusers] Re: No interface is opening with my program??

Bayless Kirtley 01/09/2013

Project Features

About this Project

www was started in November 2009, is owned by jpirek, and has 21 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20131025.e7cbc9d). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close