Replacing Panels in JTabbedPane

I'll try to explain this coherently... hopefully it makes sense.
- I have a Jtabbedpane with multiple tabs. Tab1 and Tab2.
- Panel1 and Panel2 are associted with Tab1 and Tab2 respectively.
- I have a button on Panel2 and when it's pressed I call setcomponentat() to set Panel3 to be displayed on Tab2. Panel2 goes away.
That works great.
- Then if you click on Tab1 and then back to Tab2, I have a change listener that listens for the click back to Tab2 and "resets" the tab to again show Panel2 (again with setcomponentat())
Which also works great.
However, at this point the button on Panel2 that sets Tab2 to display Panel3.... no longer works. Well, to be more accurate, it works, the function is called (verified by system.out ouput) and Panel2 is no longer "interactive" but Panel3 is not painted.
Any idea why it works at first, but not after the panels are switched out a few times?

Hmm.... I don't think that is my problem. I was trying to avoid posting all the code.... but whatever.
Much of this is Netbeans generated, so I apologize for any readability issues:
public class TheBox extends javax.swing.JFrame implements ChangeListener {
    // Implement custom change listener
    public void stateChanged(ChangeEvent evt)
        JTabbedPane tabbedPane = (JTabbedPane)evt.getSource();
        // Get current tab
     int tab = tabbedPane.getSelectedIndex();
        System.out.println("Tab is: " + (tab+1));
        if (tab == 1)
            {TheBoxTabbedPane.setComponentAt(1,SellTicketsPanel);}
        if (tab == 2)
            {TheBoxTabbedPane.setComponentAt(2,ManageProductionsPanel);}
        if (tab == 3)
            TheBoxTabbedPane.setComponentAt(3,ReportsPanel);
            jPanel1.setVisible(false);
            ReportsPanel.repaint();
            ReportsPanel.revalidate();
    /** Creates new form TheBox */
    public TheBox()
        initComponents();
        jPanel1.setVisible(false);
        // Register a change listener
        TheBoxTabbedPane.addChangeListener(this);
    /** 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.
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">                         
    private void initComponents() {
        TheBoxTabbedPane = new javax.swing.JTabbedPane();
        HomePanel = new javax.swing.JPanel();
        Stage = new javax.swing.JButton();
        WelcomBanner = new javax.swing.JButton();
        ExitButton = new javax.swing.JButton();
        SellTicketsPanel = new javax.swing.JPanel();
        ManageProductionsPanel = new javax.swing.JPanel();
        ManageProductionsHeading = new javax.swing.JButton();
        CreateProductionButton = new javax.swing.JButton();
        DeleteProductionButton = new javax.swing.JButton();
        SearchProductionButton = new javax.swing.JButton();
        ReleaseTicketsButton = new javax.swing.JButton();
        ReportsPanel = new javax.swing.JPanel();
        PrintReportsHeading = new javax.swing.JButton();
        TicketReportsButton = new javax.swing.JButton();
        AddressReportsButton = new javax.swing.JButton();
        PhoneReportsButton = new javax.swing.JButton();
        jPanel1 = new javax.swing.JPanel();
        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        TheBoxTabbedPane.setBackground(new java.awt.Color(255, 255, 255));
        HomePanel.setBackground(new java.awt.Color(0, 0, 0));
        Stage.setBackground(new java.awt.Color(0, 0, 0));
        Stage.setIcon(new javax.swing.ImageIcon("/home/bvs/java_projects/JavaApplication1/src/javaapplication1/Box Images/stage.jpg"));
        Stage.setBorderPainted(false);
        WelcomBanner.setBackground(new java.awt.Color(0, 0, 0));
        WelcomBanner.setIcon(new javax.swing.ImageIcon("/home/bvs/java_projects/JavaApplication1/src/javaapplication1/Box Images/welcome.gif"));
        WelcomBanner.setBorderPainted(false);
        ExitButton.setBackground(new java.awt.Color(255, 255, 255));
        ExitButton.setText("Exit");
        ExitButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ExitButtonActionPerformed(evt);
        org.jdesktop.layout.GroupLayout HomePanelLayout = new org.jdesktop.layout.GroupLayout(HomePanel);
        HomePanel.setLayout(HomePanelLayout);
        HomePanelLayout.setHorizontalGroup(
            HomePanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(HomePanelLayout.createSequentialGroup()
                .addContainerGap(145, Short.MAX_VALUE)
                .add(HomePanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, HomePanelLayout.createSequentialGroup()
                        .add(Stage)
                        .add(127, 127, 127))
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, HomePanelLayout.createSequentialGroup()
                        .add(WelcomBanner)
                        .add(112, 112, 112))
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, HomePanelLayout.createSequentialGroup()
                        .add(ExitButton)
                        .add(282, 282, 282))))
        HomePanelLayout.setVerticalGroup(
            HomePanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(HomePanelLayout.createSequentialGroup()
                .add(111, 111, 111)
                .add(Stage)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(WelcomBanner)
                .add(54, 54, 54)
                .add(ExitButton)
                .addContainerGap(45, Short.MAX_VALUE))
        TheBoxTabbedPane.addTab("Home", HomePanel);
        SellTicketsPanel.setBackground(new java.awt.Color(0, 0, 0));
        org.jdesktop.layout.GroupLayout SellTicketsPanelLayout = new org.jdesktop.layout.GroupLayout(SellTicketsPanel);
        SellTicketsPanel.setLayout(SellTicketsPanelLayout);
        SellTicketsPanelLayout.setHorizontalGroup(
            SellTicketsPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 641, Short.MAX_VALUE)
        SellTicketsPanelLayout.setVerticalGroup(
            SellTicketsPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 464, Short.MAX_VALUE)
        TheBoxTabbedPane.addTab("Sell Tickets", SellTicketsPanel);
        ManageProductionsPanel.setBackground(new java.awt.Color(0, 0, 0));
        ManageProductionsHeading.setBackground(new java.awt.Color(0, 0, 0));
        ManageProductionsHeading.setIcon(new javax.swing.ImageIcon("/home/bvs/java_projects/JavaApplication1/src/javaapplication1/Box Images/manage_productions_heading.gif"));
        ManageProductionsHeading.setBorderPainted(false);
        CreateProductionButton.setBackground(new java.awt.Color(0, 0, 0));
        CreateProductionButton.setIcon(new javax.swing.ImageIcon("/home/bvs/java_projects/JavaApplication1/src/javaapplication1/Box Images/off_create_a_new_pro.gif"));
        CreateProductionButton.setBorderPainted(false);
        CreateProductionButton.setRolloverEnabled(true);
        CreateProductionButton.setRolloverIcon(new javax.swing.ImageIcon("/home/bvs/java_projects/JavaApplication1/src/javaapplication1/Box Images/on_create_a_new_pro.gif"));
        DeleteProductionButton.setBackground(new java.awt.Color(0, 0, 0));
        DeleteProductionButton.setIcon(new javax.swing.ImageIcon("/home/bvs/java_projects/JavaApplication1/src/javaapplication1/Box Images/off_delete_a_pro.gif"));
        DeleteProductionButton.setBorderPainted(false);
        DeleteProductionButton.setRolloverEnabled(true);
        DeleteProductionButton.setRolloverIcon(new javax.swing.ImageIcon("/home/bvs/java_projects/JavaApplication1/src/javaapplication1/Box Images/on_delete_a_pro.gif"));
        SearchProductionButton.setBackground(new java.awt.Color(0, 0, 0));
        SearchProductionButton.setIcon(new javax.swing.ImageIcon("/home/bvs/java_projects/JavaApplication1/src/javaapplication1/Box Images/off_search_pro.gif"));
        SearchProductionButton.setBorderPainted(false);
        SearchProductionButton.setRolloverEnabled(true);
        SearchProductionButton.setRolloverIcon(new javax.swing.ImageIcon("/home/bvs/java_projects/JavaApplication1/src/javaapplication1/Box Images/on_search_pro.gif"));
        ReleaseTicketsButton.setBackground(new java.awt.Color(0, 0, 0));
        ReleaseTicketsButton.setIcon(new javax.swing.ImageIcon("/home/bvs/java_projects/JavaApplication1/src/javaapplication1/Box Images/off_release_a_ticket.gif"));
        ReleaseTicketsButton.setBorderPainted(false);
        ReleaseTicketsButton.setRolloverEnabled(true);
        ReleaseTicketsButton.setRolloverIcon(new javax.swing.ImageIcon("/home/bvs/java_projects/JavaApplication1/src/javaapplication1/Box Images/on_release_a_ticket.gif"));
        org.jdesktop.layout.GroupLayout ManageProductionsPanelLayout = new org.jdesktop.layout.GroupLayout(ManageProductionsPanel);
        ManageProductionsPanel.setLayout(ManageProductionsPanelLayout);
        ManageProductionsPanelLayout.setHorizontalGroup(
            ManageProductionsPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, ManageProductionsPanelLayout.createSequentialGroup()
                .addContainerGap(164, Short.MAX_VALUE)
                .add(ManageProductionsPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(ManageProductionsHeading)
                    .add(ManageProductionsPanelLayout.createSequentialGroup()
                        .add(12, 12, 12)
                        .add(ManageProductionsPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(DeleteProductionButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 240, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .add(CreateProductionButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 240, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .add(SearchProductionButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 240, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .add(ReleaseTicketsButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 240, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))
                .add(193, 193, 193))
        ManageProductionsPanelLayout.setVerticalGroup(
            ManageProductionsPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(ManageProductionsPanelLayout.createSequentialGroup()
                .add(48, 48, 48)
                .add(ManageProductionsHeading)
                .add(15, 15, 15)
                .add(CreateProductionButton)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(DeleteProductionButton)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(SearchProductionButton)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(ReleaseTicketsButton)
                .addContainerGap(116, Short.MAX_VALUE))
        TheBoxTabbedPane.addTab("Manage Productions", ManageProductionsPanel);
        ReportsPanel.setBackground(new java.awt.Color(0, 0, 0));
        PrintReportsHeading.setBackground(new java.awt.Color(0, 0, 0));
        PrintReportsHeading.setIcon(new javax.swing.ImageIcon("/home/bvs/java_projects/JavaApplication1/src/javaapplication1/Box Images/print_reports_heading.gif"));
        PrintReportsHeading.setBorderPainted(false);
        TicketReportsButton.setBackground(new java.awt.Color(0, 0, 0));
        TicketReportsButton.setIcon(new javax.swing.ImageIcon("/home/bvs/java_projects/JavaApplication1/src/javaapplication1/Box Images/off_ticket_reports.gif"));
        TicketReportsButton.setBorderPainted(false);
        TicketReportsButton.setRolloverEnabled(true);
        TicketReportsButton.setRolloverIcon(new javax.swing.ImageIcon("/home/bvs/java_projects/JavaApplication1/src/javaapplication1/Box Images/on_ticket_reports.gif"));
        TicketReportsButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TicketReportsButtonActionPerformed(evt);
        AddressReportsButton.setBackground(new java.awt.Color(0, 0, 0));
        AddressReportsButton.setIcon(new javax.swing.ImageIcon("/home/bvs/java_projects/JavaApplication1/src/javaapplication1/Box Images/off_address_reports.gif"));
        AddressReportsButton.setBorderPainted(false);
        AddressReportsButton.setRolloverEnabled(true);
        AddressReportsButton.setRolloverIcon(new javax.swing.ImageIcon("/home/bvs/java_projects/JavaApplication1/src/javaapplication1/Box Images/on_address_reports.gif"));
        PhoneReportsButton.setBackground(new java.awt.Color(0, 0, 0));
        PhoneReportsButton.setIcon(new javax.swing.ImageIcon("/home/bvs/java_projects/JavaApplication1/src/javaapplication1/Box Images/off_phone_reports.gif"));
        PhoneReportsButton.setBorderPainted(false);
        PhoneReportsButton.setRolloverEnabled(true);
        PhoneReportsButton.setRolloverIcon(new javax.swing.ImageIcon("/home/bvs/java_projects/JavaApplication1/src/javaapplication1/Box Images/on_phone_reports.gif"));
        org.jdesktop.layout.GroupLayout ReportsPanelLayout = new org.jdesktop.layout.GroupLayout(ReportsPanel);
        ReportsPanel.setLayout(ReportsPanelLayout);
        ReportsPanelLayout.setHorizontalGroup(
            ReportsPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(ReportsPanelLayout.createSequentialGroup()
                .add(149, 149, 149)
                .add(ReportsPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(PhoneReportsButton)
                    .add(AddressReportsButton)
                    .add(TicketReportsButton)
                    .add(PrintReportsHeading))
                .addContainerGap(208, Short.MAX_VALUE))
        ReportsPanelLayout.setVerticalGroup(
            ReportsPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(ReportsPanelLayout.createSequentialGroup()
                .add(49, 49, 49)
                .add(PrintReportsHeading)
                .add(24, 24, 24)
                .add(TicketReportsButton)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(AddressReportsButton)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(PhoneReportsButton)
                .addContainerGap(165, Short.MAX_VALUE))
        TheBoxTabbedPane.addTab("Reports", ReportsPanel);
        jPanel1.setBackground(new java.awt.Color(255, 0, 204));
        jPanel1.setVisible(false);
        org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 629, Short.MAX_VALUE)
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 56, Short.MAX_VALUE)
        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(TheBoxTabbedPane)
            .add(jPanel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(TheBoxTabbedPane, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 491, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
            .add(jPanel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
        pack();
    }// </editor-fold>                       
    private void TicketReportsButtonActionPerformed(java.awt.event.ActionEvent evt) {                                                   
    System.out.println("working");
    jPanel1.setVisible(true);
    TheBoxTabbedPane.setComponentAt(3,jPanel1);
    ReportsPanel.repaint();
    ReportsPanel.revalidate();
    private void ExitButtonActionPerformed(java.awt.event.ActionEvent evt) {                                          
        System.exit(0);
     * @param args the command line arguments
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new TheBox().setVisible(true);
    // Variables declaration - do not modify                    
    private javax.swing.JButton AddressReportsButton;
    private javax.swing.JButton CreateProductionButton;
    private javax.swing.JButton DeleteProductionButton;
    private javax.swing.JButton ExitButton;
    private javax.swing.JPanel HomePanel;
    private javax.swing.JButton ManageProductionsHeading;
    private javax.swing.JPanel ManageProductionsPanel;
    private javax.swing.JButton PhoneReportsButton;
    private javax.swing.JButton PrintReportsHeading;
    private javax.swing.JButton ReleaseTicketsButton;
    private javax.swing.JPanel ReportsPanel;
    private javax.swing.JButton SearchProductionButton;
    private javax.swing.JPanel SellTicketsPanel;
    private javax.swing.JButton Stage;
    private javax.swing.JTabbedPane TheBoxTabbedPane;
    private javax.swing.JButton TicketReportsButton;
    private javax.swing.JButton WelcomBanner;
    private javax.swing.JPanel jPanel1;
    // End of variables declaration                  
}

Similar Messages

  • Satellite L850-P13 - no backlight after replacing panel

    Hi, I have cracked panel. Sister felt on cauch and sit on screen while computer laying on couch fully opened lid and machine was working. Cristal leaked under the glas layer. His soul left to heaven. Sister is OK.
    Brief inspection found that NB is still alive (not a screen) , connected to external vga panel everything was working OK.
    New panel was ordered. After reinstalation got no backlite. Screen is dark, but it is posible to see the content on screen if backlighted with torch or lamp. It is working, just all is on "dark side".
    First , I can't get POST while external screen is connected. It shows the picture when windows already starting.
    For this reason I dare not to upgrade BIOS which is asked by Toshiba control center or what else is called that thing running on system. It also asked for video driver update as well what I did , but no difference.
    At the Computer- Hardware list, at the Display, I can see two devices. Both are recognised as Generic Display. Other one should be external screen.
    Is this normal? I mean, does at least LCd panell should be recognised as something else then "generic"?
    Before replacement panel was ordered it happens to have another broken L750 (this one was washed with water while ON) . Repair service send it back as "total damaged".
    I tried to put panel from this one in hope that will work and it did.
    Panels were perfect matched (type and model). And it did worked. Brightness was not the best, and there were some distorsion at screen picture and flickerings .
    So it was not useful for repairment. I did switch PC off and on couple of times.
    Every time the brightnes drop down. Finally I gave up on trying and order/wait for new panel.
    When new one arrived got no backlight at all as mentioned above.
    I wish to know how to get external screen to show POST from the very begining how I would be able to enter BIOS or BIOS update utillity?
    Any other idea what may cause missing backlight having in mind described behavior of backlight during test with panel from "water treated" notebook?

    Yes exactly. Your reasons are correct. Unfortunately I just found out third one.
    But first:
    1. New display baklights are working. It is tested. I perfom the test.
    2. New display has exactly same model and suffix so it should be right
    Now, according my measurement found VLED voltage is 3.5V .
    According display's manufacturer spec this voltage should be from 7 to 21Volts, typically 12V. When main voltage is so low, then LED_EN i PWM signals are less important in this moment.
    At the main board found smd element (probably resistor) faulty.
    It is visible cracked line over the element.
    It was necessary to use really strong magnifying glass to see that.
    Resistor is in close proximity to the LCD connector and sits on "fat" pcb line.
    I am pretty much sure that this is the right cause.
    I doubt that will find authorized service nearby, which is capable to identify smd piece and solder new one.
    However, I am able to solder new piece, just have no glue about the value.

  • Replacement panels for a G3

    Hi-
    can anyone tell me where I can obtain the plastic panels and corners for a g3?
    I'm trying to fix up my daughter's first Mac.
    Thanks-
    Ray

    There is always somebody "parting out" a failed Blue & White G3 on eBay. It may take a few weeks for the exact parts you need to come up, but they will. It probably does not make sense to replace the panels on a Mac this old. Be cautious, if you built one out of parts it could easily cost ten times what you could sell it for.
    Some sellers are claiming that the handles are so prone to breaking after this many years that they will not ship one of those Macs with the handles ON. They are removed and packed in the box, which can ship for slightly less because it can be smaller, now that UPS et al are charging for size AND weight.

  • Is there any difference in quality between different LCD replacement panels.

    I have a Model 1260 15" macbook pro from early 2008.  Today a button popped off my shirt.  I randomly tossed it on the desk near my bed.  Later I went to close the laptop and... *CRACK* the button was sitting on the notebook just to the right of the magsafe adapter.  Now the 4 left most inches of my screen are just a series of vertical lines.  I'm wanting to hold out for the next big redesign before purchasing a new computer.   I'm really hoping next year's model will ditch the optical drive and either have a large SDD or a combo of SDD and HD.  In the mean time, I'd like to just replace the screen.  I looked at ifixit and a few youtube videos.  While the process looks tedious, it doesn't look particularly difficult as long as I'm careful.  There seem to be 3 brands, Samsung, LG-Phillips, and Chi-Mei.  There are also many sellers listing panels on ebay and I've messaged a few to ask what brand panels they are using.  Should I go for any one brand over the others?
    Thanks.
    -Kevin

    First, don't hang onto the hope that next year's MBP won't have an optical drive; instead, you'd be advised to purchase a 2011 MacBook Air, which doesn't have an optical drive but relies on SDD. If you need a CD/DVD drive, you can get that separately, if you need. The latest Air has received better reviews than anything else in the Apple lineup.
    I'm not an expert on the different brand of keys available. But you'll want to make sure the color is an exactly match to the model. Replacing thes keys is relatively inexpensive but tedious, you might do well to email sellers to guarantee the color and fit.
    Good luck with the repair!

  • X220 came back from depot with one dead pixel on new replaced panel

    I bought my X220 on May, 2011. It was working great up until last month when suddenly several dead pixels(around 5) appeared on the IPS panel. They were dark dots scattered on the mid bottom part of the display, and were invisible only on dark images. I tried various stuck pixel fixing programs for several hours with not good result.
    I called the support number for Canada, explained the issue and immediately got a call number and a box was on the way.
    Yesterday I received the X220 back after a week and half, which is quite fast for what I expected the service time to be in Canada. When I turn on the machine I immediately notice some backlight bleed on the bottom on the screen given that the old one didn't have any. I thought it would not bother me since I could only see it if displaying dark backgrounds, which is rare for me once in Windows. But I also notice one dead pixel on the mid bottom right of the screen, and it looks darker and bigger than the ones in the old screen. Anytime I'm looking at anything bright colored I see it.
    As of now, while I'm at work the X220 is running UDpixel at home to see if it gets fixed. I was wondering if Lenovo would grant me another repair call seeing that the dead pixel bothers me more than the ones in the old panel, although it is only one.

    @pacho,
    You can try taking a picture of the screen showing the backlight bleed and try contacting support and see if they can get it replace again. Do let them know your previous case number as well.
    Lenovo dead pixel policy here.
    http://support.lenovo.com/en_US/detail.page?Legacy​DocID=MIGR-69856
    However I am not sure if it applies to IPS panels.
    *Non Lenovo employee*
    I have a Y2P (i5) ... Feel free to ping me if you want me to test some applications with your Y2P if you have the same model. I don't mind keep doing recovery on it if needed .... =)

  • Replace panel on actionPerformed

    I thought it could be this simple, but I must be missing something. When my frame displays, mainPanel displays at first. Once a user selects on of my menu options, I need to remove one panel from the frame and add one. I figured this code was good enough, but it isn't working right. It's removing the mainPanel, but it isn't adding the rosterPanel1.
        private void sort1RosterActionPerformed (java.awt.event.ActionEvent evt)                                           
            getContentPane ().remove (mainPanel);
            getContentPane ().add (rosterPanel1);
            pack ();
        }

    In the future, Swing related questions should be posted in the Swing forum.
    Generally you would use revalidate() and sometimes repaint() after adding or removing components from a visible panel. When using the contentPane you need to cast it to a JPanel first, since revalidate() is a JComponent method.
    In the past I've notice problem updating the content pane directly. A simple solution is to use a [url http://java.sun.com/docs/books/tutorial/uiswing/layout/card.html]Card Layout

  • Replacing existing panel with a new panel.

    I don't use swing much and I have ran into a small problem.
    What is the standard procedure for replacing a jpanel on a
    jframe with another jpanel in the exact same position?
    Say you had a form on the first panel, when the user clicks
    next it display a new panel with a confirmation of the results
    and disposes of the old one.
    I have tried add,remove, setcontenpane. setvisible etc but nothing
    works. Can someone explain?
    Here is a small app which demonstrates my problem:
    import java.awt.FlowLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.*;
    public class FrameTest extends JFrame implements ActionListener{
         JPanel jp1;
         JPanel jp2;
         JButton jb1;
         JButton jb2;
         public FrameTest(String name) {
              super(name);
              init();
         public void init() {
              jp1 = new JPanel(new FlowLayout());
              jb1 = new JButton("One");
              jb1.addActionListener(this);
              jp1.add(jb1);
              setContentPane(jp1);
              setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
              setBounds(0, 0, 200, 200);
              setVisible(true);
         public JPanel panelTwo() {
              jp2 = new JPanel(new FlowLayout());
              jb2 = new JButton("Two");
              jb2.addActionListener(this);
              jp2.add(jb2);
              return jp2;
         public static void main(String[] args) {
              FrameTest ft = new FrameTest("Test");
          * On click I wish to replace panel one
          * with panel two
         public void actionPerformed(ActionEvent e) {
                   //What can I add here?
    }Regards

    I just took a look on the Java Tutorial and it is exactly what I am after.
    Thank you.

  • Differences in replacement rear panel

    After now being able to buy replacement part's for repair's I noticed there is a clear difference on the inside of the original & replacement panel:
    the black on the left is the original panel, the white on the right is the replacement & as you can see the original has only a small part that lines up with the contacts to the phone whereas the replacements is fully exposed, does this affect usage? or is it just a change in the manufacturing process? or is this not the replacement part I should be using & will need to find an alternative?
    Regards

    It just highlights the clear cmos button as it is not just an LED but the actual clear cmos button. If pressing it will clear cmos (system needs to be off)

  • JTabbedPane not maximized in frame.

    Hi,
    I have an swing application which comprises of this code:
    (the code hash as been shortened). My problem is when the user clicks on
    the button from LoginPanel, the panel gets removed and get replaced with a JTabbedPane(AgentMain). However, the JTabbedPane is not correctly displayed, meaning it is not fully maximized to the frame. It is just centered in the middle of the frame with a set size. How can I make the JTabbedPane fully maximized with the frame?
    1. class REASApp extends JFrame{
    ... etc
    getContentPane().add(BorderLayout.CENTER,new LoginPanel());
    public static void main(String[] args){          
         ReasApp mp = new ReasApp();
         mp.pack();
         mp.setSize(600, 400);
         mp.setBackground(Color.white);
         mp.setVisible(true);
    } // Closes main method
    2. class LoginPanel extends JPanel{
    JPanel mainPanel = new JPanel();
    add(mainPanel);
    public void actionPerformed(ActionEvent evt){
              if (evt.getSource() == bLogin){
              removeAll();
              add(new AgentMain());
              revalidate();
              repaint();
    3. class AgentMain extends JTabbedPane{
    ... etc
    }

    change the layout
    setLayout(new BorderLayout());

  • JTabbedPane - removing/adding tabs

    Using JDK 1.4, I am attempting to refresh a JTabbedPane based on a user selection. I have tried several approaches (removing all of the tabs from the JTabbedPane; removing the panel the JTabbedPane sits on from a larger panel). In both cases, doing a remove (JTabbedPane.removeAll for the JTabbedPane, and Panel.remove [component] for the panel), the area where the JTabbedPane should appear is blank. Here is the code I have tried (createTabs calls the addTab method; createTabPanel puts the tabbedpane on a panel):
    public void refreshWindow ( String asReportNo )
         // Remove current tab panel from main panel
         csjpMainPanel.remove ( csjpTabPanel );
         // Recreate tabs, then tab panel
         //csjtab.removeAll();
         //csjtab.revalidate();
         JTabbedPane lsjtab = createTabs ( asReportNo );
         csjtab = lsjtab;
         csjpTabPanel = createTabPanel();
         //csjtab.setVisible ( true );
         //csjpTabPanel.setVisible ( true );
         csjpTabPanel.revalidate();          
         csjpTabPanel.repaint();
         // Put tab panel back on main panel
         GridBagConstraints lgbc = new GridBagConstraints();
         lgbc.gridx = 1;
         lgbc.gridy = 0;
         lgbc.insets = new Insets ( 3, 3, 3, 3 );
         lgbc.weightx = 1.0;
         lgbc.weighty = 0.5;
         lgbc.fill = GridBagConstraints.BOTH;
         lgbc.anchor = GridBagConstraints.NORTHWEST;
         csjpMainPanel.add ( csjpTabPanel, lgbc );
         csjpMainPanel.repaint();          
    Any ideas on what I could do to make the tabbed pane visible? I saw that there was a problem with JTabbedPane in earlier releases, but this is with 1.4.
    Thanks,
    Van Williams

    yes, that's right... remove the synchronized blocks and replace them with invoke laters... If your are going to synchronize this, it has to be
    synchronized(monitor) {
    // update code
    -->
    synchronized(tabbedPane.getTreeLock()) {
    // update code
    which is still not as good as the following
    -->
    SwingUtilities.invokeLater(new Runnable() {
    public void run() {
      // update code
    };

  • Find & Replace

    I'm trying to get DW 8 to allow me to remove some of the
    "found" items before using the replace function to avoid having to
    open each file individually - but when I delete entries from the
    "found" list, on r-click I'm given 3 options:
    - Open File
    - Find & Replace
    - Clear Results
    The Find & Replace option takes me back to the original
    Find & Replace screen. With DW4 you have the option of deleting
    some of the "found" entries before pressing the "replace" button.
    Has DW really taken a backward step?

    I neevr used DW4, so I'm not certain how that worked. And it
    doesn't look like you can delete entries from the Search panel.
    You might use other techniques to limit your changes. Any
    folders or files that are cloaked will not be updated by the
    Replace. You can set cloaking for specific files or folders, or by
    file extension (on the Site panel). Or, you could select only the
    files you want to target and use the Selected Files in Site option
    of the Find In drop-down. Or, you could use the Replace button in
    the Find/Replace panel to go through the results one at a time,
    rather than using Replace All.
    If you are changing HTML tags or attributes, the Find/Replace
    options are very powerful.

  • How can I tell if replacement LCD is "good"?

    Hi everyone
    I bought a used 20" Intel iMac that supposedly only needed a hard drive and a new LCD panel in order to work.  The hard drive was easily installed.  I ordered a replacement panel off eBay and installed it, but I'm seeing a grey screen with lots of tiny black rectangles on it.  I figured that maybe there's a problem with the video card, so I scrounged up a Mini-DVI to DVI adapter, and connected an external monitor.  However, nothing ever displays on that external monitor.  If there is truly a problem with the video card (the logic board?), I'm going to stop buying parts and sell the carcass....
    Anyway, how can I tell if the replacement LCD is good?  Does the weird pattern I'm seeing on the display indicate a problem with the panel or with the video card?  And shouldnt the iMac automatically output to the external display when I connect it via the adapter?
    Thanks!

    Hello, does it sound like it's booting up at all?
    If we could get it to boot, we could take a screen grab & that would tell us, if the screen capture was indentical to wahat you're seeing then it'd be the graphic card, since it captures it from the card/VRAM, not the screen actually.
    As far as the adapter I think you have to have it at least booted up part way for a second monitor to even light up, not positive though.

  • Doubt in JTabbedPane ..

    Hi,
    I am having a JTabbedPane and using the following code to add Panels to JTabbedPane.
    public class IntegratedUI extends JPanel{
         public IntegratedUI() {
    JTabbedPane tabbedPane = new JTabbedPane();
    JPanel usagepanel = UsageConsole.makeFrame();
    tabbedPane.addTab("UsageConsole",usagepanel);
    tabbedPane.setSelectedIndex(0);
    JPanel deploymentpanel =Generator.makedeploymentFrame();
    tabbedPane.addTab("Deployment",deploymentpanel);
    JPanel generatorpanel =WGenarator.makegeneratorFrame();
    tabbedPane.addTab("Generator",generatorpanel);
    setLayout(new GridLayout(1,1));
    add(tabbedPane);
    public static void main(String[] args) {
    JFrame frame = new JFrame("XYZ");
    frame.addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) {System.exit(0);}
    frame.getContentPane().add(new IntegratedUI()
    frame.setBounds(0,0,800,400);
    frame.setVisible(true);
    My JTabbedPane is displaying fine but my first Panel USageConsole is getting displayed.My second and third panel is not getting displayed.While i tried to debug using breakpoints.its calling the first class fine.The second and third class is not getting called.What could be the problem..
    Thanks for your reply in advance.

    It looks like your Generator and WGenerator classes have static methods that are supposed to return JPanels, hopefully with components on them. I would write a small test app to verify that you can show these on their own; say, add each one to a JPanel with GridBagLayout, one panel per row. This way you can really see what's going on. I don't see any obvious problems in your tabbed pane code.

  • Can I replace the LCD with an LED on Early 2009 24" model?

    I have an old 2009 (okay, so not that old) iMac and the LCD has some serious burn-in and it's to the point where I can't use the computer without it hurting my eyes. I'm looking to replace the screen, but the computer still works great and I don't want to have to do this again in four to five years. Any chance I can take an LED display from a 24" Cinema Display and put it in the iMac, or are the connections different?

    Personally I would use a Mini DisplayPort to DVI Adapter, DVI cable and a $130 DVI monitor, before shelling out for a $500 to $600 for a replacement panel. Or at least until your 100% sure, that there is nothing wrong with the logicboard or graphic's chip.
    Optionally a Belkin Mini DisplayPort to HDMI Cable would be an even cheaper setup, if you already have an HDMI TV.
    Addtitionally I would probably just replace the iMac with another iMac or Mac Mini, because it is real hard to justify spending anything at all on a 5 year old system.

  • JTabbedPane and JScrollPane problem

    Hi all,
    I'm trying to make working JScrollPane into JTabbedPane. I have been trying several times to make it but with no acceptable effects :( I attached below the simple code to show what I'm interested in.
    PANEL1 has its dimension. I'd like to make that the JScrollPane will be active and enabled to roll when user change JFrame size to less than PANEL1 on pane1.
    Please help!
    Thanks for everyone,
    Greetings,
    import java.lang.*;
    import java.util.*;
    import java.awt.*;
    import java.awt.geom.*;
    import javax.swing.*;
    public class Sample     {
    static JFrame fr;
    static JPanel pane1, pane2, pane3;
    static JLabel AAA, BBB, CCC;
    static JPanel PANEL1;
    static JTabbedPane panel;
    public static void main(String args[])     {
              fr = new JFrame("Sample");
              pane1 = new JPanel();
              pane1.setLayout(null);
              pane2 = new JPanel();
              pane2.setLayout(null);
              pane3 = new JPanel();
              pane3.setLayout(null);
              panel = new JTabbedPane();
              Font myfont1 = new Font("SansSerif",0,20);
              Font myfont2 = new Font("SansSerif",0,15);
              Font myfont3 = new Font("SensSerif",1,15);
              AAA = new JLabel("AAA");
              BBB = new JLabel("BBB");
              CCC = new JLabel("CCC");
              AAA.setFont(myfont2);
              BBB.setFont(myfont2);
              CCC.setFont(myfont2);
              AAA.setBounds(20,20,300,20);
              BBB.setBounds(20,50,300,20);
              CCC.setBounds(20,80,300,20);
              PANEL1 = new JPanel();
              PANEL1.setLayout(null);
              PANEL1.setBackground(java.awt.Color.CYAN);
              PANEL1.setBounds(20,15,250,300);
              PANEL1.add(AAA);
              PANEL1.add(BBB);
              PANEL1.add(CCC);
              pane1.add(PANEL1);
              panel.insertTab("A", null, pane1, null, 0);
              panel.setSelectedIndex(0);
              panel.insertTab("B", null, pane2, null, 1);
              panel.setSelectedIndex(0);
              panel.insertTab("C", null, pane3, null, 2);
              panel.setSelectedIndex(0);
              panel.setBounds(0,0,550,450);
              fr.setLayout(null);
              //fr.setResizable(false);
              fr.setBackground(java.awt.Color.CYAN);
              fr.setForeground(java.awt.Color.CYAN);
              fr.add(panel);
              fr.pack();
              fr.setSize(550, 450);
              fr.setLocationRelativeTo(null);
              fr.setVisible(true);
    }

    Unfortunately no :( Besides, I can't understand at
    all this line:
    JTabbedPane (panel)TabbedPane = ... new
    w JTabbedPane(...).add/insertTab( ... new
    JScrollPane(new JPanel(...)) ... )It's to big cut-off like for me. Can you insert it
    into my Sample?
    Regards and thanks,It's only my "dev speak". Put a ";" and a var name (, ...) whereever needed, and remove some"()".
    (Sorry, normally I don't help dev beginners on so more complex problems, with just an easy answer.)

Maybe you are looking for

  • Commit in a loop of records for the cursor

    Hello my procedure has the following structure procedure proc2 BEGIN begin insert into table A exception when others log the error return end begin insert into table B exception when others log the error return end END--end of proc2 --main procedure

  • Stuck Shift Key (Help!!)

    I needsome help! I've been having a LOT of problems with my MacBook Unibody late 2008 with Lion installed.  The shift key is stuck. At first I thought it was a bug and restored everything from a timemachine backup. Nothing changed. The computer refus

  • Dtp processing mode change

    Dear gurus , i have compressed the request and set the marker unchecked and after that dtp processing mode has been changed in a way that now request is processed automatically to dtp without showing dtp monitor .it gives me a prompt "The request gen

  • Emoze Configuration Problem in C 7-00

    When I am trying to install Emoze push mail client in Nokia C-7, it is getting installed and when I am click on the add account it is running for quite long time and getting back with a message no connection.... It was earlier working fine with my No

  • Desktop and finder window icons missing

    Some of the icons on the top of my desktop suddenly went blank. they are there since I can click where they were and still use them. The same has happened to the top of the finder window as well. Here are some screen shots. Any one have an idea how t