My panel doesnt comes visible .....why?

ive read, and ive been told that the only thing i need to make a panel and its contents visible is to make the panel visible by using the setVisible() method,
but iv tried that and it doesnt work, i dont know if i have to make visible each component in the panel or what, could anyone help me please??
Here is my code:
import java.io.*;
import java.util.Vector;
public class MainWin extends javax.swing.JFrame {
public static ClientesDB Clientes;
public static ProductosDB Productos;
public MainWin() {
initComponents();
private void jMenuItem1MouseClicked(java.awt.event.MouseEvent evt) {                                       
ClientPanel.setVisible(true);
private void jButton2MouseClicked(java.awt.event.MouseEvent evt) {                                     
Vector result;
if(buttonGroup1.getSelection().equals(jRadioButton1))
result=Clientes.Match_name(jTextField1.getText());
else{
if(buttonGroup1.getSelection().equals(jRadioButton2))
result=Clientes.Match_rfc(jTextField1.getText());
else{
if(buttonGroup1.getSelection().equals(jRadioButton3))
result=Clientes.Match_tel(jTextField1.getText());
else
result=new Vector(0);
if(result.size()==0)
jTextField1.setText("No hubo coincidencias o No selecciono un criterio de busqueda");
else
for(int i=0;i<result.size();i++)
jComboBox1.addItem(result.elementAt(i));
private void jButton1MouseClicked(java.awt.event.MouseEvent evt) {                                     
System.exit(0);
public static void main(String args[])throws IOException, ClassNotFoundException {
File path=new File("c://MaximaPresion//Database");
if(!path.exists())
path.mkdirs();
File clFile=new File(path, "clientes.txt");
if(!clFile.exists()){
clFile.createNewFile();
Clientes= new ClientesDB(500);
FileOutputStream FOS1=new FileOutputStream(clFile);
ObjectOutputStream out1=new ObjectOutputStream(FOS1);
out1.writeObject(Clientes);
out1.close();
FOS1.close();
out1=null;
FOS1=null;
} else{
FileInputStream FIS1=new FileInputStream(clFile);
ObjectInputStream in1=new ObjectInputStream(FIS1);
Clientes=(ClientesDB)in1.readObject();
in1.close();
FIS1.close();
in1=null;
FIS1=null;
File prFile=new File(path, "ptoductos.txt");
if(!prFile.exists()){
prFile.createNewFile();
Productos=new ProductosDB(500);
FileOutputStream FOS2=new FileOutputStream(prFile);
ObjectOutputStream out2=new ObjectOutputStream(FOS2);
out2.writeObject(Productos);
out2.close();
FOS2.close();
out2=null;
FOS2=null;
} else{
FileInputStream FIS2=new FileInputStream(prFile);
ObjectInputStream in2=new ObjectInputStream(FIS2);
Productos=(ProductosDB)in2.readObject();
in2.close();
FIS2.close();
in2=null;
FIS2=null;
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new MainWin().setVisible(true);
I skiped the variable declaration and the init components cause i dont think its necesary. could anyone help me?

it doesnt do anything so............ i think that must be it, ok........ im using netbeans, where do i find how to add the actionlistener to a menuItem?
I guess its not the same to add actions to a menuItem than to add em to a jButton, but i havent found how to do it, so could anyone tell me where to find it?

Similar Messages

  • I have 2 albums on my iTunes library (Brand New Machine and Calamari) and when I go to sync it onto my iPhone 5s it doesnt come up as an option, when I go to the itunes store it wont let me download it from the cloud, why can I get these 2 specific album?

    I'm not sure if there are more albums that are doing this and I just havn't noticed that they aren't on my phones but I really want thee two album on my phone, when I go onto iTune on my computer the albums are there and I can listen to the music, but when I go to sync my music (I have a shared account with my mum so I select my music individualy) it doesnt come up as an option, and when I go to the iTunes app on my phone I can't download the albums from the cloud, it just says purchased, any idea what I can do?

    Hello nat.weidner
    Start with the article below for troubleshooting issue with connecting to the iTunes Store.
    Can't connect to the iTunes Store
    http://support.apple.com/kb/TS1368
    Thanks for using Apple Support Communities.
    Regards,
    -Norm G.

  • Content OF  Panel Is Not Visible. Need Help

    Hi Guys,
    Can someone tell me why the contents of the "VisPanel" (JPanel) class is not showing up in the main window. I just don't understand why it is not visible after i add it to the main window.
    Here is the code. You can test it. Only the button shows up. The contents of "VisPanel" class is not visible.
    Replace the images in the "VisPanel" class with any image of your choice. I made them 130 X 130. I would have like to add the images in the post but i don't think it is possible to add images to post in this forum.
    public class TilesImage extends JFrame{
         private static final long serialVersionUID = 1L;
         public TilesImage(){
                this.setLayout(new GridLayout(2,1));
                this.setSize(600,600);
                this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                VisPanel vis = new VisPanel();
                JPanel pana = new JPanel();
                pana.add(vis);
                BufferedImage sub = vis.getImg().getSubimage(261, 260, 129, 129);
               JButton but = new JButton(new ImageIcon(sub));
               pana.add(but);
               this.add(pana);
               this.setContentPane(pana);
               this.setVisible(true);
               repaint();
           public static void main( String[] args ) {
                 new TilesImage();
                 //new VisPanel();
    class VisPanel extends JPanel{
          private static final int IMAGE_TYPE = BufferedImage.TYPE_INT_ARGB;
           private BufferedImage img;
          public VisPanel() {
                 // here you should create a compatible BufferedImage
                 //img = new BufferedImage( 450, 350, IMAGE_TYPE ); 
                 img = new BufferedImage( 525, 500, IMAGE_TYPE );
                     this.setSize(img.getWidth(), img.getHeight());    
                 final int NB_TILES = 4;
                 BufferedImage[] tiles = new BufferedImage[NB_TILES];
                 tiles[0] = createHorizontalRail( new Color( 255, 255, 255 ) );
                 tiles[1] = createVerticalRail( new Color( 255, 255, 255 ) );
                 tiles[2] = createCrossing( new Color( 255,   0, 255 ) );
                 final int[][] map = new int[][] {
                             {4, 4, 1},    
                               {4, 4, 1},
                               {0, 0, 2},
                               {4, 4, 4}, 
                 for (int i = 0; i < map[0].length; i++) {
                       BufferedImage tile = null;
                     for (int j = 0; j < map.length; j++) {
                          if(map[j] == 0){
                   tile = tiles[0];
                   for (int x = 0; x < tile.getWidth(); x++) {
              for (int y = 0; y < tile.getHeight(); y++) {
              img.setRGB( x + i * 130, y + j * 130, tile.getRGB(x,y) );
                   //img.setRGB( x + i * 45, y + j * 32, tile.getRGB(x,y) );
              } if(map[j][i] == 1){
                   tile = tiles[1];
                   for (int x = 0; x < tile.getWidth(); x++) {
              for (int y = 0; y < tile.getHeight(); y++) {
              img.setRGB( x + i * 130, y + j * 130, tile.getRGB(x,y) );
              if(map[j][i] == 2){
                   tile = tiles[2];
                   for (int x = 0; x < tile.getWidth(); x++) {
              for (int y = 0; y < tile.getHeight(); y++) {
              img.setRGB( x + i * 130, y + j * 130, tile.getRGB(x,y) );
         this.setVisible( true );
         private BufferedImage createHorizontalRail( final Color c ) {
         final Random r = new Random();
         BufferedImage img = null;
         try {
         img = ImageIO.read(new File("images/crossingsHorizontal.JPG"));
         } catch (IOException e) {
         return img;
         private BufferedImage createVerticalRail( final Color c ) {
         final Random r = new Random();
         BufferedImage img = null;
         try {
         img = ImageIO.read(new File("images/crossingsVertical2.JPG"));
         } catch (IOException e) {
         return img;
         private BufferedImage createCrossing( final Color c ) {
         final Random r = new Random();
         BufferedImage img = null;
         try {
         img = ImageIO.read(new File("images/railCrossing2.JPG"));
         } catch (IOException e) {
         return img;
         public void paintComponent(Graphics g) {
         g.drawImage(img, 0, 0, null);
              public BufferedImage getImg() {
                   return img;
              public void setImg(BufferedImage img) {
                   this.img = img;
    Thanks for your help.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    kap wrote:
    The "pana" panel must contain both the contents of the "VisPanel" panel and the button i created. So it is correct to set the contenPane to the "pana" panel. I tried to set the content pane to the "VisPanel" panel. It is visible but the button i added to the "pana" panel cannot be visible.
    I hope you understand what i mean here.He understands exactly what you mean and has pointed out your mistake and offered a decent solution. I suggest you take his advice and set the layout of pana not the JFrame.

  • The cap lock key doesnt work sometimes, why? 13 pro(2013, late)

    The cap lock key doesnt work sometimes, why? 13 pro(2013, late)

    Hi, BOSCO_LIN. 
    Here is a helpful article that will walk you through troubleshooting the issue with your caps lock not responding.
    One or more keys on the keyboard do not respond
    http://support.apple.com/kb/ts1381
    Regards,
    Jason H.

  • Some music doesnt come up in my search?

    sometimes when I search some songs or artists, it doesnt come up as what I searched. i know that they are spelled right and everything but it I still have no results. for example i search "acdc" and it comes up with all of this other stuff like tribute bands and stuff. does someone know why this is?

    What is available in the iTunes Store is what the content owners have been willing to license. There are a number of tracks, albums, etc. for which Apple has been unable to obtain the rights. AC/DC, as Chris said, signed an exclusive deal with Verizon. Other artists have similar exclusive deals with other stores, or have been unwilling to license for download at all (the most common reason being that the artist, or record company, doesn't want to license for individual-track sale but rather only by complete albums), or have their own download setup. You can submit a suggestion through the iTunes music request page, but there may be nothing Apple can do.

  • Keyboard light doesnt come on

    does anyone know why my keyboard light doesnt come on now even if the press the dimmer keys?
    some sort of cable loose within the comp or something? i didnt set some sort of setting?

    Hi,
    i had the same problem one month ago
    Because of the day light or your desk light is too near to your camera sensor if you close the camera with your hand and try to change the keyboard light it would work!

  • When i plug in my iPod nano, it doesnt come up in iTunes. It is a file.

    When i plug in my iPod nano, it doesnt come up in iTunes. It comes up as a file. It wont show up on iTunes. What can I do to fix this?
      Windows XP  

    Welcome to Apple Discussions.
    You mean it appears in My Computer but not in iTunes? If so, check this first:
    iPod missing in My Computer or in iTunes on Windows
    iPod shows up in Windows Explorer but not in iTunes, iPod Service Error or Please reinstall iTunes

  • I have a new email and am trying to change it in icloud. but it has locked me out and won't send my email a reset password link for some reason. even though it says its sent, it doesnt come to the email address

    i have a new email so have a new apple ID now and am trying to change it in icloud. but it has locked me out and won't send my email a reset password link for some reason. even though it says its sent, it doesnt come to the email address. help!

    Welcome to the Apple community.
    If you are unable to remember your password, security questions, don’t have access to your rescue address or are unable to reset your password for whatever reason, your only option is to contact Apple ID Support, upon speaking to an operator you should explain that your problem is related to your Apple ID, this way you will not be charged for assistance, even if you don’t have an AppleCare plan.
    You will need to show patience with the procedure and be prepared to demonstrate without question that the account belongs to you. Don’t expect access to be restored immediately and if you aren’t the owner of the Apple ID registered to the device the account won’t be reset.
    This is answer is provided from my own database of boilerplate responses and the content was last reviewed and/or tested on: 2014/12/18

  • Autoplay doesnt come up when i plug my iphone 6 in to the computer?

    Before the Iphone 6 i had a iphone 4, for work i take a lot of photos and then store them on a hard drive when back in the office. I have always done this by plugging the phone in and then accessing the photo folder on the phone and Cutting and pasting into the relevant files on the computer. Have gone to do this with my new iphone 6 and when i plug it in the autoplay option doesnt come up and it doent show in my computer. have tried doing it when unlocked as i know that stopped me getting photos off before.
    any help will be much appreciated.
    thanks Ant

    anthonyfromstapledord wrote:
    Before the Iphone 6 i had a iphone 4, for work i take a lot of photos and then store them on a hard drive when back in the office. I have always done this by plugging the phone in and then accessing the photo folder on the phone and Cutting and pasting into the relevant files on the computer. Have gone to do this with my new iphone 6 and when i plug it in the autoplay option doesnt come up and it doent show in my computer. have tried doing it when unlocked as i know that stopped me getting photos off before.
    any help will be much appreciated.
    thanks Ant
    If auto play doesn't show up, then it is an issue with your computer and not the iphone.
    Suggest you double check your computer settings for autoplay.

  • HT1351 Whenever I try to sync music to my ipod from itunes, it will go through all the steps up until it actually downloads the music, then it starts, and doesnt move. Why wont it download anything?

    Whenever I try to sync music to my ipod from itunes, it will go through all the steps up until it actually downloads the music, then it starts, and doesnt move. Why wont it download anything?

    Try here:
    iTunes: Error 13019 during sync
    Not updating the iOS should not effect your problem.
    As long as all the apps are in the iTunes library, you will not lose app data by updating the iOS.

  • Im trying to connect my ipad to my connection at home and its taking the password but still wont connect and doesnt tell me why.i even tried to reset network settings

    im trying to connect my ipad to my connection at home and its taking the password but still wont connect and doesnt tell me why?? .i even tried to reset network settings

    Try a system reset.  It cures many ills and it's quick, easy and harmless...
    Hold down the on/off switch and the Home button simultaneously until the screen blacks out or you see the Apple logo.  Ignore the "Slide to power off" text if it appears.  You will not lose any apps, data, music, movies, settings, etc.
    If the Reset doesn't work, my guess is that it's a router issue.  You'll need to get administrative access to the router and determine if it has a firewall.  If one is present, turn it off and test the iPad.  If that solves the problem, don't leave it that way.  Turn the firewall back on but weaken it a notch and test again.  Repeat as required.
    For what it's worth, a router firewall can stop iPad communication without affecting computer communication.  I do not understand why the difference.
    Edit...
    I just saw the post from Diavonex.  An off/on is certainly worth a shot.  Leave it off for ten seconds.

  • HT1386 when i plug in my iphone, it doesnt come up in the options in iTunes, i have already reinstalled iTunes. Help!!

    when i plug in my iphone, it doesnt come up in the options in iTunes, i have already reinstalled iTunes. Help!!

    Try Here  >  http://support.apple.com/kb/TS1538

  • Ive deleted something, not sure what but my Ipod connects then disconnects. It doesnt come up on my Itunes or 'My Computer' Whatever happened, it deleted my music of my pod! Someone pleaseeee HELP!

    Ive deleted something, not sure what but my Ipod connects then disconnects. It doesnt come up on my Itunes or 'My Computer' Whatever happened, it deleted my music of my pod! Someone pleaseeee HELP!
    1. Ipod connects then disconnects
    2. Ive deleted my Itunes then d/l the new Itunes
    3. Ipod doesnt show up in Itunes
    4. Ipod doesnt show in 'My Computer'
    5. Ive reset my ipod
    6. Ive put it in Disc Mode
    & after all of that still nothing except an ipod that works but with no songs or videos!!
    HELP ME AHHH!!
    Thankyou

    Do the iPod Disk Diagnostics as posted by tt2, it wont fix your problem, but helps in troubleshooting.
    Post the results, so we will try to help.

  • When I try to use iMessage on my iPad my phone number doesnt come up, only my email address does. HELP !

    When I try to use iMessage on my iPad my phone number doesnt come up, only my email address does. HELP !!!!!!

    It is OK to use the same apple id on multiple devices. That is how it was intended to be used. The phone number used must be a number registered on an iPhone. I receive imessages and face time calls on my iPad, iPhone and imac. Sometimes the email addresses and iPhone numbers don't properly register on all device. Logging out and back in on all devices can fix the issue.
    Now with the release of ios 8 other compatible Apple devices can use the iPhone over a WiFi network to send and receive vioce calls as well.

  • HT201401 i did a master clear to wipe out contacts and info on i phone 3g and it said about an hour and it never came back on just an apple appears and it doesnt come up in i tunes to restore?

    i did a master clear to wipe out contacts and info on i phone 3g and it said about an hour and it never came back on just an apple appears and it doesnt come up in i tunes to restore?

    Place the iPhone in recovery mode or DFU mode (search Google) and restore.

Maybe you are looking for

  • SAP E Recruiting - Manage future leaving employees in standalone EREC system.

    Program HRALXSYNC We are using E Recruiting system as a separate server and employee master data comes via ALE IDOCS Is report HRALXSYNC need to run in case of separate server also? It is creating user ids which we do want as our system administrator

  • Xdebug 2.1.3-2 and netbeans issue

    After upgrading to 2.1.3-2 I encountered issues with debugging php code in netbeans 7.2 (netbeans kept loosing socket). Downgrading back to 2.1.2-1 saved the day. I am curious if I am just alone and if anybody found the way how to fix it eventually.

  • Super- first statement in constructor.

    my compiler (Jcreator LE) doesn't seem to recognize that super is the first statement in the constructor, and gives me an error message (the same thing happens using the this keyword). public void Student(String str, int day, int mo, int yr, String m

  • OMS Configuration failed

    While installing EMGC: OMS Configuration failed: Error encountered: Code of Exception: Error occured while performing nmConnect : Cannot connect to Node Manager. : Connection refused. Could not connect to NodeManager. Check that it is running at <mac

  • I cannot get the transform skew feature to apply

    i cannot get hte transform skew feature to apply