Minor JTabbbed Pane Problem

I have this problem,i add the following 3 JPanels to the JTabbedPane but when i display the JTabbedPane in the GUI,the first tab is selected by default at the start,The 3 tabs overlap for some reason(you can see all the data form the 3 tabs behind the tab in front),If i select all the tabs then they go back to normal,is there anyway you know know to fix this.
public void cretateJTabbedPane()
           JPanel theTabbedPanel = new JPanel();
           tabbedPane = new JTabbedPane(JTabbedPane.BOTTOM);
           tabbedPane.setSize(400,700);
           tabbedPane.addTab("Main Options", mainHeadingSection);
           tabbedPane.addTab("Options ", otherOptionsSection);
           tabbedPane.addTab(" Product Version ", prodVersionSection);
           theTabbedPanel.add(tabbedPane);
          theTabbedPanel.setMinimumSize(new Dimension(400,700));
          theTabbedPanel.setPreferredSize(new Dimension(400,700));
     addComp(theTabbedPanel,this,gb1,gbc,0,1,1,1,1,1,gbc.NORTH);
     addComp(buttonSection,this,gb1,gbc,0,0,1,1,1,1,gbc.NORTH);
     tabbedPane.setSelectedIndex(0);
}

As stated in my comment, dragging the empty icons out of the toolbar and trashing them, then accessing the Toolbar customizing function, everything was returned to normal.
Griff

Similar Messages

  • MacBook pro, snow leopard, iPhone and Bluetooth PAN problems

    Short Version:
    I am having connectivity issues connecting my new MacBook Pro (MBP) to the Internet thru a Bluetooth PAN on my iPhone4. This has been working fine for a few days and then today it just stopped working responding that my iphone connection is not available, it's off, too far away or whatever. This is not the case. When I try to connect the iPhone to the MBP the iPhone is saying my MBP is not supported. I can pair the devices, but as soon as I try to connect to the Internet thru the iPhone via the MBP the connection fails.
    Long Version:
    I received a shiny new MacBook Pro only a few days ago and I am having Bluetooth Paired networking issues as of today, 2nd, March, 2011. The MacBook Pro is running Snow Leopard 10.6.4, and is brand spanking new, unmodified, factory defaults.
    The iPhone(s) I am using are iPhone 4's with iOS 4.1
    On the first day I paired the MBP with both iPhones with ease, it was so easy my grandparents could have done it. So point and click and it just worked....
    The iPhones are set up in iTunes with names similar to dave1 and dave2
    On the MBP I can select which device I want to connect to the Internet by going to the Bluetooth icon and connecting to whichever iPhone I have handy at the time. Since the plans are limited connectivity, I do load share between the two.
    Today, for no apparent reason, I have been unable to connect to my wife's phone just getting a basic "The Bluetooth network is unavailable" message telling me the iphone is out of range, not on, etc etc etc. Not true.
    No problem, I just connected to my phone instead. Occasionally I tried her phone again, but it just never worked. I eventually got her to reboot it, still no joy.
    Then, a couple of hours ago, while in the middle of reading my rss feeds, my Bluetooth connection dropped out. My phone is sitting right next to the MBP. So that's not the issue. No amount of reboots of either the MBP or the iPhone have fixed this. I have unpaired and repaired the devices (on both phones) countless times. I have removed the sim card and rebooted, I have disabled and reenabled Bluetooth on both, rebooting before doing this, and after and during, I have reset network settings. Nothing I try is working here.
    Pairing alone is an event, but here's an example of what's happening:
    I go thru the motions, the MBP shows me a number (eg, 451234) and the number is displayed on the iPhone. They see each other. The numbers are the same. Good. I click PAIR on the iPhone and MBP and everything appears good. But then if I go to connect to the iphone on the MBP I get the out of range error.
    I have made both discoverable, and tried to connect to the MBP from the iphone, and got a different error message altogether: Connection Unsuccessful - "{insert my name}'s MacBook Pro" is not supported. W-T-F? It was an hour ago? What has changed?
    Then, the only option on the iPhone is to "Forget Device". ok, forget it, and start again. Same same.
    Neither the iPhones nor the MBP have been upgraded or changed in anyway today, or even recently. In fact, as mentioned earlier, I was actively using the connection without any issues for a number of hours when it just stopped for no apparent reason.
    Not that these matter, but I am in Thailand (live here for the time being), I'm on the TrueMove network, which offers 3G coverage in my area (Patong Beach).
    This could easily have been filed under MacBook Pro, iPhone, OSX and possibly many other discussion headings, because the issue can be any or all of the OS, the MacBook Pro Bluetooth adapter, the iPhone Bluetooth, (iOS for that matter), or some other unforeseen conditions...
    My head is sore from pulling my hair out. I am open to any suggestions (reasonable or otherwise!)
    For further info (not that this post is long enough already, or anything, but), I thought it was interesting that the phones didn't fail at the same time, so I pulled out an old iPhone 3GS and set it up, but after pairing, the two can still not connect.
    I know its not an issue with the data plan on the iPhone since I'm here surfing now without an issue, so it's not a data problem.
    Open to ideas....
    If you've read this far and you're ever in Phuket, give me a call... I'll shout you a beer

    Ok, now I do wish I could edit....
    I forgot to APPLY the network settings for the USB cable to work. Connected thru USB I can tether.
    So, I kept playing, and playing some more...
    I had previously unpaired everything, and gone as far as removing network devices HOWEVER...
    I didn't remove the Ethernet, Firewire or Airport Network devices.
    Now, I have done so. I REMOVED EVERYTHING
    No pairing, no network devices.
    Bluetooth was already turned off, and I rebooted.
    I turned off tethering and rebooted the iphone.
    I turned on bluetooth (on the MBP), I turned on tethering. I browsed for the iphone. It said I was already paired???? Ok, repair AGAIN, and THE IPHONE SHOWED MY BLUETOOTH TETHERING BLUE BAR at the top of the screen!
    I opened a web page, no go... d4mn, I was close...
    Opened network preferences and the created a new bluetooth PAN and voila! Internet back on the MBP. I am about to reinstall the ethernet and airport (I can live without firewire for now) and see what happens.
    Basically, the link I posted two posts ago, I had already done that, but I NEEDED to remove ethernet, firewire and airport as well...
    So MAYBE it's fixed, we'll see for how long. I'm not going to mark this as answered for now, because basically, it has failed for no reason, and I want to know why...
    Hopefully someone can come up with something, but having to delete and reinstall all pairings and network devices (to me) is not really a solution, it's a workaround (at best).

  • Preference pane problem after installing Tiger

    Hi
    I made a mistake: I put this post on another forum (iTunes !) so I start again here and edit it.
    sorry for this lengthy post !
    Hello
    I upgraded 2 days ago to Tiger via Erase and Install. I was very nervous but I had no problem with the upgrade itself. The Set up assistant brought back my files from my back up on FWdrive and everything seems to be fine. I followed the "take control of upgrading to Tiger" step by step. I have not yet restored missing files as it is advised but I really don't know what to restore !
    When I went through the Preference system, the panes all worked fine except the "desk and screen saver" pane, which behaves strangely: it opens and immediately crashes. A dialogue appears with 3 choices: "close/report or open again" (in this order). I choose "open again" and the same happens when I select the "desk and screen saver".
    But, this time, another dialogue appears with "close/ retry/report" (in this order). I choose "retry" this time and the whole Preference system reappears… in japanese !
    I live in Japan but I am french so my system is in french. Now, with the Pref Sys in japanese it works when I click on the desk and sreen saver pane, but I don't have anymore my selection of pictures for the desk (of course I can get them back from my pictures). When I close it I get a message (in english): "new settings have been created for this application. Do you wish to use these settings from now on ? "
    choice is: use new settings / use original settings.
    I tried both. But this pane crashes again after I open it (in french and not in japanese) from the Apple menu or the icon on the side as usual.
    It is not a life threatening situation but it is bothering if I have to go through the whole circus each time I want to change the picture of my desk !
    other anomalies:
    the Iphoto and iMovie applications do the same.
    the Quick Time Player does not open at all.
    the iTunes app tells me that the files cannot be read because they were created with a later version of iTunes (the install DVD of Tiger is for Tiger 10.4.6 and the iTunes version is 6.0.4. But I had updated my iTunes while I was using OSX 10.3.9 and I have the 7.6 version on my back up). I guess updating the OS will be enough to fix this ?!
    last thing (but not the least): when I want to add an URL to my favorites the favorites window doesn't open. "Show all the favorites" and "add a new file" work though.Do I need another kind of manipulation with Tiger ?!
    I have been through all the applications, including in the Utilities folder and they are the only ones that don't work.
    I'm considering downgrading and performing a simple upgrade (but in that case, I might again have trouble with iTunes, no?)
    tell me if my conclusions are right:
    during the upgrading, somehow some files necessary for some applications were not transfered and when I want to open these apps the computer goes back to the original language when I first bought it (japanese).
    I could still use them in japanese but it is not very confortable for me and I really would like to have the french or english version of the same app !
    I hope someone will shed some light on this !
    thanks
    parupano

    ok. One by one:
    1- i'll try re-installing iPhoto and iMovie. But you did not tell me if it was enough to just bring the application to the trash or if I had to look somewhere else…
    2- QT: there is no pkg in the /Library/receipts !
    but there are many QT "things":
    QTPlayer app in /applications/QTPlayer app.
    QTUpdater in /system/library/QT (together with many components)
    QTPlayer in /applications(mac OS 09) /QT/QTPlayer
    QTUpdater in /applications(mac OS 09)/QT/QTUpdater
    _in japanese:_
    QTtm settings in /system folder/control panel/QTtmsetting (classic)
    QTExtension in /system folder/extension/QTextension
    3 - I looked in /System/library/PreferencePanes and there are 2 aliases:
    ScreenSaver.prefPane: type: alias 4KB
    Internet.prefPane type: alias
    but DesktopScrennEffectsPref.pefPane is like all the other panes: type: Mac OSX preferences panel
    does "alias" means that they are not really there ? what should I do ?
    4 - no Safari extension or helper. QT is indicated for the Preference Pane, so you were right.
    well, what do you make of all this ?
    for me, one thing is sure: I'm learning a lot about computer !
    thanks again for your time, I'm waiting for your answer.
    parupano

  • Apple Warranty is not internationaly? or Cannot be repaired by Any of icare Shop? IF its still under warranty. becoz when i Went to icare3 in khobar region (saudi Arabia) they Deny to repair it free of Charge. it was having A minor power button problem.

    I perchase Iphone 4 before from Jarir book store saudi arabia. with one year warranty.
    but after just a one month later i found a minor problem in power button but i neglect it and was using it.
    but later Almost 8 months i Bring it to icare Shop Which is situated in khobar ksa.
    but they deny to repair it free of Cost by telling that u not perchased it from us. As i know the Apple warranty is internationaly. but even in same coutry And Almost same place of Perchased area The i care told me we will repair it With Charge not free of Cost. And then i pay 250 Saudi riyals for a minor problem even its was under warranty.
    and problem was Also very minor.
    my mobile serial number is
    01*********359
    Job order number
    iCR3-JO-763
    <Personal Information Edited by Host>

    for this one no need to tell your IMEI number and all. if your phone is bought in apple store with one year apple care warranty then you can replace a new iphone charged upto $150. so how did you got the apple care warranty from an local book stall shop?

  • Split Pane Problem

    I have a panel with a split pane in it. On the Left hand side there is a Tree and on the right side is a complex tabbed pane.
    (complex meand it includes many panels, more tabbed panes and other components).
    My problem is this. I have given a specific width for the split pane for the tree and at start time it comes corrcetly. But when I move the Split pane left, suddenly it jumps to the left edge of the screen. And then I cant move it forward again. Tree cannot be seen now.
    Why does this happen I just cant figure out.
    Is it because of tabbed panes or something with the split pane.
    Another thing is when I try to move the split pane to the left the movements are not smooth. It kind of do smaller jumps, until it do that big jump to the edge.
    Any help would be greatly appreciated....

    Seeing that your file has a size of 3.5 Mb, I preferred not to download it, but to send you this link.

  • JCombobox on a jtabbed pane, AND Choice on jtabbed pane problems

    I have a Choice on a jtabbed pane, on a panel that isn't showing when the jtabbed pane is made visible. The Choice on the hidden pane is "bleeding" through to the first tabbed panel. help!
    If I click on the second tabbed panel (where the Choice is), and then click on the first tabbed panel, the Choice becomes hidden like it is supposed to.
    AND, I have a JComboBox on a JTabbedPane, it works for the most part, but when you click on it, the scrollbox underneath it doesn't appear! Instead, a grey box appears below it. Help!

    I was having similar problems when I was working with JFrames, Anything not covered by a piece of GUI would show other parts of my program (like the progress bar or buttons and stuff).
    Anyway, it went away when I used the setBackground() method. My guess is that using this forces the container to be opaque or something. Anyway, it worked for me, maybe it will work for you also.
    Steve

  • Jtabbed pane problem + flags printout

    Hi,
    I am having difficulty displaying a JTabbedPane which is contained by a dialog. When I display the Dialog for the first time the Tabbed displays perfectly - anytime after that it disappears.
    I found this really strange so I put in some printout statements for the JTabbed pane here's what I got
    When it displays the prinout for the JTabbed pane is ............................
    extCellTabbedPane
    rnh.adj.cellhandovermgt.gui.refactor.ExtCellTabbedPane[,0,0,0x0,invalid,layout=javax.swi
    ng.plaf.basic.BasicTabbedPaneUI$TabbedPaneLayout,alignmentX=null,alignmentY=null
    ,border=,flags=0,maximumSize=,minimumSize=,preferredSize=,haveRegistered=false,t
    abPlacement=TOP]
    When it does n't display the prinout for the JTabbedPane is
    rnh.adjcellhandovermgt.gui.refactor.ExtCellTabbedPane[,0,67,193x45,inv
    alid,layout=javax.swing.plaf.basic.BasicTabbedPaneUI$TabbedPaneLayout,alignmentX
    =null,alignmentY=null,border=,flags=16,maximumSize=,minimumSize=,preferredSize=,
    haveRegistered=false,tabPlacement=TOP]
    What I am interested in is the meaning of the parameter flags. In one case it is 0 and in one case it is 16? What does this parameter mean? Where I can get some information on this as I think this will tell me what is happening to the JTabbedPane.
    Thank you in Advance
    Alex

    The flags item reflect the flags value in JComponent
    class. It represents several status
    of the component:
    REQUEST_FOCUS_DISABLE
    IS_DOUBLE_BUFFERED
    ANCESTOR_USING_BUFFER
    IS_PAINTING_TITLE
    HAS_FOCUS
    IS_OPAQUE
    As my understand about your problem, this may be no
    help for you to locate the error
    As the message you post, you might use a third
    implementation of JTabbedPane, so the
    problem might be in the implementation. I
    have used JTabbedPane often with no error
    like you say :)
    Hope this Helps!Thanks for your help here - I would like more information if possible i.e. a numerical mapping for each property - do you know where I could get this. I don't really understand what you mean about the Third implementation. Do you mean simply extend the JTabbedPane? Thisis what I do but I don't really know what part to change to stop it disappearing. Thanks once again. Anymore help would be greatly appreciated.

  • Content Pane Problem

    Greetings!
    I'm facing two related problems in developing a Java Applet.
    My applet class extends JApplet.
    1) The current default layout of the whole window (not individual
    components) seems to be a flowLayout. I'd like to set the layout to a
    gridBagLayout, however the setLayout command does not seem to be
    understood (my compiler is eclipse, JRE 1.5.0 and JDK 5.0), so I
    cannot get the following code to work, no specific error msg
    generated:
    getContentPane.setLayout(new GridBagLayout);
    2) similar problem, cannot setBackground or setForeground of the
    overall pane.
    Please Advise, thanks.
    -Darum

    The essentials of the code in question:
    public class STMapplet extends JApplet implements ActionListener{
         getContentPane.setLayout(new GridBagLayout());
    The whole code:
    public class STMapplet extends JApplet implements ActionListener{
         //Creat Public Text Area with 10 rows, 5 columns
         JTextArea text = new JTextArea(10,20);
         //Set the contentPane (overall applett) layout
         getContentPane.setLayout(new GridBagLayout());
         //Generate image public object and set location
         Image picture;
         int imageX = 175;
         int imageY = 50;
         //frame specs, # of frames, time between frames (ms)
         int NUM_FRMS = 65;
         int MAX_FRMS = 65;
         long FRMRATE = 7;
         //Declare variables
         boolean highV = false;
         boolean lowV = false;
         boolean highI = false;
         boolean lowI = false;
         // Declare Public image URLS, will be established later during paint method
         // Use the same URLs for LILV and HIHV
         URL hVhI;
         URL hVlI;
         URL lVhI;
         //Border URLs
         URL IMGBorderTop;
         URL IMGBorderLeft;
         URL IMGBorderRight;
         URL IMGBorderBottom;
         Image BORDERTOP;
         Image BORDERLEFT;
         Image BORDERRIGHT;
         Image BORDERBOTTOM;
         //Declare Public Buttons
         JButton highVButton;
         JButton lowVButton;
         JButton highIButton;
         JButton lowIButton;
         JButton SCAN;
         * constraint construction for layout
         * addGB adds a component to the panel that has a grid bag layout
         GridBagConstraints constraints = new GridBagConstraints();
         void addGB(JPanel panel, Component component, int x, int y){
              constraints.gridx =x;
              constraints.gridy = y;
              panel.add(component, constraints);     
         * Build User Interface
         public void init()
              //Generate buttons for each of the conditions
              SCAN = new JButton("Begin Scanning");
              highVButton = new JButton("1.00");
              lowVButton = new JButton("0.07");
              highIButton = new JButton("2.00");
              lowIButton = new JButton("0.10");
              //add action detection, the action listener is this
              SCAN.addActionListener( this );
              highVButton.addActionListener( this );
              lowVButton.addActionListener( this );
              highIButton.addActionListener( this );
              lowIButton.addActionListener( this );
              //create viewing panel with gridbag layout
              JPanel panel = new JPanel(new GridBagLayout());
              //create pane for text and add to content pane
              getContentPane().add( "East", new JScrollPane (text));
              //add buttons and headers to panel and add panel to pane
              addGB(panel, new JLabel("Voltage (V)"),0,1);
              addGB(panel, new JLabel("Current (nA)"),0,4);
              addGB(panel, highVButton,0,3);
              addGB(panel, lowVButton, 0,2);
              addGB(panel, highIButton, 0,6);
              addGB(panel, lowIButton,0,5);
              addGB(panel, SCAN, 0, 0);
              getContentPane().add("West" , panel);
              //author
              text.append("@Darin Bellisario\n");
         * Display image according to buttons pressed, called with repaint()
         public void paint(Graphics g){
              //Draw Border
              //Get URLs
              try { IMGBorderTop = new URL("http://ase.tufts.edu/chemistry/sykes/Applets/STMapplet/IMGBorderTop.jpg");} catch (Exception e){}
              try { IMGBorderRight = new URL("http://ase.tufts.edu/chemistry/sykes/Applets/STMapplet/IMGBorderRight.jpg");} catch (Exception e){}
              try { IMGBorderLeft = new URL("http://ase.tufts.edu/chemistry/sykes/Applets/STMapplet/IMGBorderLeft.jpg");} catch (Exception e){}
              try { IMGBorderBottom = new URL("http://ase.tufts.edu/chemistry/sykes/Applets/STMapplet/IMGBorderBottom.jpg");} catch (Exception e){}
              // Draw
              BORDERTOP = getImage(IMGBorderTop, "IMGBorderTop.jpg");
              BORDERRIGHT = getImage(IMGBorderRight, "IMGBorderRight.jpg");
              BORDERLEFT = getImage(IMGBorderLeft, "IMGBorderleft.jpg");
              BORDERBOTTOM = getImage(IMGBorderBottom, "IMGBorderBottom.jpg");
              g.drawImage(BORDERTOP,imageX - 49, imageY - 20, this );
              g.drawImage(BORDERRIGHT,imageX + 613, imageY, this );
              g.drawImage(BORDERLEFT,imageX - 49, imageY, this );
              g.drawImage(BORDERBOTTOM,imageX, imageY + 613, this );
              //     Display Appropriate image (HIHV & LILV same image)
              if( (highV == true && highI == true) || (lowV == true && lowI == true) ){
                   for (int i = 1; i<= NUM_FRMS; i++){
                             //Display first part of pic
                             try { hVhI = new URL("http://ase.tufts.edu/chemistry/sykes/Applets/STMapplet/LILV&HIHV" + i + "of" + MAX_FRMS + "%20copy.jpg");
                             picture = getImage(hVhI, "LILV&HIHV" + i + "of" + MAX_FRMS + "%20copy.jpg");
                             g.drawImage(picture,imageX,imageY,this);
                             //wait
                             Thread.sleep(FRMRATE);
                             }catch (Exception e){System.out.println("the wait thing fucked up");}
              } else      if( (highV == true && lowI == true) ){
                   for (int i = 1; i<= NUM_FRMS; i++){
                             //Display first part of pic
                             try { hVlI = new URL("http://ase.tufts.edu/chemistry/sykes/Applets/STMapplet/LIHV" + i + "of" + MAX_FRMS + "%20copy.jpg");
                             picture = getImage(hVhI, "LIHV" + i + "of" + MAX_FRMS + "%20copy.jpg");
                             g.drawImage(picture,imageX,imageY,this);
                             //wait
                             Thread.sleep(FRMRATE);
                             }catch (Exception e){System.out.println("the wait thing fucked up");}
              } else      if( (lowV == true && highI == true) ){
                   for (int i = 1; i<= NUM_FRMS; i++){
                             //Display first part of pic
                             try { lVhI = new URL("http://ase.tufts.edu/chemistry/sykes/Applets/STMapplet/HILV" + i + "of" + MAX_FRMS + "%20copy.jpg");
                             picture = getImage(hVhI, "HILV" + i + "of" + NUM_FRMS + "%20copy.jpg");
                             g.drawImage(picture,imageX,imageY,this);
                             //wait
                             Thread.sleep(FRMRATE);
                             }catch (Exception e){System.out.println("the wait thing fucked up");}
         //change image based on what buttons pressed. When an action is performed, the actionlistener (this) calls actionperformed
         public void actionPerformed (ActionEvent e){
              if (e.getSource() == highVButton){
                   highV = true;
                   lowV = false;
                   text.append("Voltage on High\n");
              if (e.getSource() == lowVButton){
                   lowV = true;
                   highV = false;
                   text.append("Voltage on Low\n");
              if (e.getSource() == highIButton){
                   lowI = false;
                   highI = true;
                   text.append("Current on High\n");
              if (e.getSource() == lowIButton){
                   lowI = true;
                   highI = false;
                   text.append("Current on Low\n");
              if (e.getSource() == SCAN){
                   text.append("Scanning\n");
                   repaint();
    Many Thanks for Any Aid!
    -Darum

  • Clear content pane problems

    can anyone tell why can't I clear the content pane in the following code or a method to achieve this thing?
    thank you.
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package librabrymanagementf;
    import java.awt.event.ActionEvent;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import java.awt.*;
    import javax.swing.SwingUtilities;
    import java.io.*;
    import java.io.File;
    import java.lang.Object;
    * @author emi
    public class Main {
         * @param args the command line arguments
        public static void main(String[] args) {
                  // Creates a model of the system logic.
            libraryModel model = new libraryModel();
            // Creaties a view for the system logic.
            libraryView view = new libraryView();
            // Creates a controller that links the two.
            libraryController controller = new libraryController(model, view);
      class libraryModel{
       public void addToFile(String title, String author, String ID){
       try{   
        FileWriter fw= new FileWriter("file.txt",true);
        fw.write(title+"\t"+author+"\t"+ID);
        fw.write("\r\n");
        fw.close();}
        catch (IOException e)
                   System.err.println ("Unable to write to file");
                   System.exit(-1);
      class libraryView{
          libraryModel model= new libraryModel();
         JFrame frame = new JFrame("[=] JMenuBar [=]");
        JMenuItem addBook = new JMenuItem("Add Book");
        JMenuItem deleteBook = new JMenuItem("Delete Book");
        JMenu modifyBook = new JMenu("Modify Book");
        JMenuItem modifyByTitle = new JMenuItem("Modify by Title");
        JMenuItem modifyByAuthor = new JMenuItem("Modify by Author");
        JMenu searchBook = new JMenu("Search Book");
        JMenuItem searchByTitle = new JMenuItem("Search by Title");
        JMenuItem searchByAuthor = new JMenuItem("Search by Author");
        JMenuItem searchByID = new JMenuItem("Search by ID");
        JMenuItem bookListing = new JMenuItem("Book Listing");
        JMenuBar menuBar = new JMenuBar();
        JMenu menu = new JMenu("Options");
        JPanel panel;
        JPanel textPanel, panelForTextFields, completionPanel;
        JLabel titleLabel, authorLabel, IDLabel, bookTitleLabel, passLabel;
        JTextField bookTitleField, authorField, IDField;
        JButton loginButton;
    public libraryView(){
         createAndShowGUI();
    public void CreateMenuBar()
          menuBar.add(menu);
          menu.add(addBook);
          menu.add(deleteBook);
          modifyBook.add(modifyByTitle);
          modifyBook.add(modifyByAuthor);
          menu.add(modifyBook);
          searchBook.add(searchByTitle);
          searchBook.add(searchByAuthor);
          searchBook.add(searchByID);
          menu.add(searchBook);
          menu.add(bookListing);
          frame.setJMenuBar(menuBar);
       public void createAndShowGUI(){
          frame.setSize(400,400);
          frame.setVisible(true);
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          CreateMenuBar();
       public void addBookForm(){
            JPanel panel = new JPanel();
            clear(panel);
            panel.setLayout(null);
            titleLabel = new JLabel("Add Book");
            titleLabel.setLocation(0,0);
            titleLabel.setSize(290, 30);
            titleLabel.setHorizontalAlignment(0);
            panel.add(titleLabel);
            // Creation of a Panel to contain the JLabels
            textPanel = new JPanel();
            textPanel.setLayout(null);
            textPanel.setLocation(10, 35);
            textPanel.setSize(70, 150);
            panel.add(textPanel);
            // Book title Label
            bookTitleLabel = new JLabel("Title");
            bookTitleLabel.setLocation(0, 0);
            bookTitleLabel.setSize(70, 40);
            bookTitleLabel.setHorizontalAlignment(4);
            textPanel.add(bookTitleLabel);
          // Book author Label
            authorLabel = new JLabel("Author");
            authorLabel.setLocation(0, 40);
            authorLabel.setSize(70, 40);
            authorLabel.setHorizontalAlignment(4);
            textPanel.add(authorLabel);
             // Book ID Label
            IDLabel = new JLabel("ID");
            IDLabel.setLocation(0, 80);
            IDLabel.setSize(70, 40);
            IDLabel.setHorizontalAlignment(4);
            textPanel.add(IDLabel);
             // TextFields Panel Container
            panelForTextFields = new JPanel();
            panelForTextFields.setLayout(null);
            panelForTextFields.setLocation(110, 47);
            panelForTextFields.setSize(200, 130);
            panel.add(panelForTextFields);
            // book title Textfield
            bookTitleField = new JTextField(8);
            bookTitleField.setLocation(0, 0);
            bookTitleField.setSize(200, 20);
            panelForTextFields.add(bookTitleField);
            // book author Textfield
            authorField = new JTextField(8);
            authorField.setLocation(0, 40);
            authorField.setSize(200, 20);
            panelForTextFields.add(authorField);
            //book id Textfield
            IDField = new JTextField(8);
            IDField.setLocation(0, 80);
            IDField.setSize(200,20);
            panelForTextFields.add(IDField);
             // Button for Submit
            loginButton = new JButton("Submit");
            loginButton.setLocation(170, 180);
            loginButton.setSize(80, 20);
            loginButton.addActionListener(new ActionListener() {
                 public void actionPerformed(ActionEvent e) {
                     String bookTitle = bookTitleField.getText().trim();
                     String bookAuthor = authorField.getText().trim();
                     String bookID = IDField.getText().trim();
                     int intBookID = Integer.parseInt(bookID);
                     model.addToFile(bookTitle, bookAuthor, bookID);
            panel.add(loginButton);
            panel.setOpaque(true);   
            frame.getContentPane().add(panel, BorderLayout.CENTER);
            frame.setVisible(true);
              clear(panel);
       public void deleteBookForm(){
            JPanel panel = new JPanel();
            panel.setLayout(null);
            titleLabel = new JLabel("Delete Book");
            titleLabel.setLocation(0,0);
            titleLabel.setSize(290, 30);
            titleLabel.setHorizontalAlignment(0);
            panel.add(titleLabel);
             panel.setOpaque(true);   
             frame.getContentPane().add(panel, BorderLayout.CENTER);
            frame.setVisible(true);
        clear(panel);
       public void clear(JPanel panel){
           panel.removeAll();
           panel.validate();
        public void MenuActionListeners(ActionListener al) {
            addBook.setActionCommand("addBook");
            addBook.addActionListener(al);
            deleteBook.setActionCommand("deleteBook");
            deleteBook.addActionListener(al);
            modifyByTitle.setActionCommand("modifyByTitle");
            modifyByTitle.addActionListener(al);
            modifyByAuthor.setActionCommand("modifyByAuthor");
            modifyByAuthor.addActionListener(al);
            searchByTitle.setActionCommand("searchByTitle");
            searchByTitle.addActionListener(al);
            searchByAuthor.setActionCommand("searchByAuthor");
            searchByAuthor.addActionListener(al);
            searchByID.setActionCommand("searchByID");
            searchByID.addActionListener(al);
            bookListing.setActionCommand("bookListing");
            bookListing.addActionListener(al);
    class libraryController implements ActionListener{
         libraryModel model;
         libraryView view;
       public libraryController (libraryModel model, libraryView view) {
            this.model = model;
            this.view  = view;
          //  this.view.init_view();
            view.MenuActionListeners(this);
         //   view.addBookListeners(this);
       public void actionPerformed(ActionEvent ae)
        String action_com = ae.getActionCommand();
            if (action_com.equals("addBook")){
            // view.clear();
             view.addBookForm();
            else if (action_com.equals("deleteBook")){
          //  view.clear();
            view.deleteBookForm();
            System.out.println("kk");
            else if (action_com.equals("modifyByTitle")){
                 System.out.println(action_com);
            else if (action_com.equals("modifyByAuthor")){
                 System.out.println(action_com);
            else if (action_com.equals("searchByTitle")){
                 System.out.println(action_com);
            else if (action_com.equals("searchByAuthor")){
                 System.out.println(action_com);
            else if (action_com.equals("searchByID")){
                 System.out.println(action_com);
            else if (action_com.equals("bookListing")){
                 System.out.println(action_com);
        Thanks!

    Please pare down your code to a manageable amount. You don't need 3/4 of that code to demonstrate your problem, so why should you ask us to read it??

  • Preferences Pane Problem.. The pane opens as a small tab. (screenshots inc)

    Hi
    I'm having a problem with Safari preferences on my Samsung R519 laptop. I find the Apple Homepage a little slow and so wanted to change it to a lighter and quicker page but I can't seem to get to the preferences to change it..
    The prefs pane opens as a tiny tab, in fact the red X close button is bigger than the main pane.. +See screenshot below.+
    http://www.melville-vs-medway.webspace.virginmedia.com/safari-problem/safaripref s.jpg
    I have so far uninstalled Safari and deleted all the Safari folders on the C drive under my user account and I'm the only account on the laptop. When I reinstalled Safari it was the same.
    I tried to reset Safari and the reset pane was the same, opened as a small tab. +See screenshot below.+
    http://www.melville-vs-medway.webspace.virginmedia.com/safari-problem/safari-res et.jpg
    And also you can see on the screenshots i'm getting "localized string not found" it doesn't seem to affect the use of Safari as I'm here on the discussions board using it now to write this up.
    Any help would be very much appreciated.

    Hi...
    I'm back and trying to scratch this itch today... Determined to get this fixed...
    So Here's what I've done today..
    Again all Safari Folders / Files deleted and Safari Un-installed again and then bin emptied..
    I then restarted the laptop and created a NEW admin account and installed Safari with that account and it works fine.... Safari started up as a new user and the Pref's pane opened up properly just as before when I created the last NEW user account only this time I've installed Safari with this account.... Hoping that all will be well with my main user account on the laptop...
    The NEW admin account with the Pref's pane open.. It works just fine with this account...
    I shut down and restarted with my main account and found Safari and started it...
    It Flashed the New User page and then went to apple.com..... I just knew what
    was coming when I tried the Pref's pane...... having seen the new user window
    flash very quickly and then Safari redirect to the apple homepage..
    Here's the broken pref's pane again...
    My next step will be to complete another delete Safari Files / Folders and un-install again, empty trash and then...... Defrag this laptop and load a couple of movies and hopefully overwrite any remnants of Safari and try again...
    For now I'm having a "Walk-away Moment" before I fit this useless piece of in a very small box with the help of a hammer and post it off to Balmer..

  • Manual panning problem

    When recording a demo using manually pan, moving the red rectangle gets recorded as part of the demo. Is there any way to avoid seeing the red rectangle recording area being moved? I don't see it in the individual slides in Captivate 6, but when I preview I see it as a thin black vertical line.
    Automatic panning doesn't have the problem of the thin black line, but it is difficult to control. Therefore, the resulting movie is rather jumpy. So I prefer to use Manual Panning if there is a way to get rid of the line.

    Hi  Jay,
    I have never used manual panning, and now with the new video capture will certainly never use it. Are you talking about video capture? It is so much easier to do this in the Video editor later on, and that editing is non-destructive. Quality is awesome compared with the old FMR.
    Lilybiri

  • Panning problems

    Hello everyone, I am having some really weird and annoying panning issues, and I hope anyone would share their wisdom.
    First off i am using Logic Pro 8, with an M-Audio NRV-10 Firewire mixer.
    The actual problem is that when I pan left on an instrument or the main output, my mixer does not pick this up and still plays through both speakers, in logic it shows that it is only coming through the left channel. Even crazier, when i pan right the volume gets reduced, once again within logic it says its playing through the right channel. I have updated all my drivers and tried to go through everything I can think of, but i have not found the problem.
    Everything works fine when it is played through the internal speakers of the mac. I have opened the NRV-10 audio interface software and had a look at the meters (meters tab) while the music was playing; when the balance is at 0 both the Input (top half) and the output (bottom half) show a reading on both meters. When i pan left, the output shows the reading of the left channel whist the input on the top half reads both channels playing the same as if the balance was at 0. When I pan right, the output reads the right channel being played, however the input meters read nothing and no sound is coming out whatsoever.
    Anyone with an idea, I have run out...
    Thanks in advance.

    Maybe something is wrong in the Audio Midi Setup of your Mac. Open that program and check the Output configuration for your Interface.

  • Display Panning Problem

    I just installed Solaris 10 x86 onto an HP6000 SFF that has an onboard Intel GMA x4500 graphics card. The monitor that I use is an NEC AccuSync92v because of the touchscreen options that it provides. I run a small Unix based sw that I wrote but the resolution has to be set to 1024x768 @ 75Hz in order for the sw to take up the entire screen of the monitor.
    The problem that I am having is that when I change the resolution to 1024x768 using the Modeline GUI in xorgcfg, then in the Configure Screen I add the resolution to the table, when I reboot, the resolution goes back to the default.
    I have looked for drivers for the Intel card, but there doesn’t seem to be one so I am using the default after the install. Is there one hidden some place on the Sun website where I can’t find it?
    Do I have to purchase separate graphics card that is on the HCL?

    Reflexions: I recently went on holiday with my new N97 mini and Ovi maps. I had created the routes online and synched it to the phone.
    Here are the problems i experienced... etc
    1. It is correct behaviour for a navigation system to take you to the first waypoint in a route first as the FIRST waypoint in a route is YOUR instruction as to where you wish to head for FIRST. And so also if you are part way through a route and exit navigation but then later resume navigation then the FIRST waypoint in the route you select is where you have now told the system where you want to go FIRST - if not then you must either step through the earlier waypoints you don't want in the route or else delete them to create a new route. It is not up to the navigation system to make second guesses as to where you want to enter a route (I am a big user of marine navigation systems and any such second guessing such as you suggest would end in disaster).
    2. Don't know how much warning my phone gives as I have never run the battery flat :-) so can't comment.
    3. GPS on my E52 and Maps 3.04 will gain a position from a cold start with no AGPS or other assistance even at 110-120kph in the car, in fact it did so today.
    4 & 5 are not matters in my experience e.g. we don't have toll roads.
    5 (6?) I have not experienced any problem panning. In my case it pans to each major turn and to each waypoint giving the distance elapsed from the start for each (so distances between any 2 such points can be calculated by subtraction). If there is only a destination and no intermediate waypoints panning steps me through the route from turn to turn giving the distance elapsed each time.
    So I don't know what it is you are doing wrong, maybe you bought the wrong phone for the job .

  • Region Panning Problem

    bear with me, I am a long time pro tools user who recently switched and I am struggling with regions big time. Anyway, the current annoying problem is this, I record acoustic guitar with 2 mics on 2 seperate tracks simultaneously, panned left and right, I do multiple takes and then use the comp feature to collate the best track, the only problem is when I select a portion of a previous take the panning goes to centre, so it all plays panned nicely until I come to the edit which jumps to centre. Must be something obvious but I haven't worked this one out yet. Can you help ?
    many thanks

    Are you panning by using automation lines? If so, disable the automation for the tracks, and pan by using the pan control.

  • Surround panning problem

    Hi,
    I've just installed Logic Studio and have been testing out the surround capabilities. I have set a channel to output in surround and can adjust the position using the small panning view (that appears above the fader). However, I know you can double click on this to load a bigger panning control, but I can't seem to be able to do this. When I double click it seems like the Panner begins to load but then just closes again - I see a small pop-up window for a split second but then it disappears. Does anyone have any ideas why this is?
    Thanks
    Jack

    Thanks for the suggestion. When viewing the auitomation data (which by the way is not truly MIDI, it's numbers from 0 to 359 representing degrees from front center, numbers that I created by dragging on the surround panner with the mouse), it's clear that the angle is being represented as 0 degrees and upward as it moves clockwise from the front center, and 359 degrees and downward as it moves counter-clockwise from front center. The problem occurs when the sound's location moves ACROSS that front center axis (a perfectly normal and logical thing for it to do to create the illusion of left-right or right-left movement), because the automation data leaps from one extreme to another (such as from 2 to 359 in my example). Well, as Logic sets the intensity of each channel sample-by-sample as it pans, it naturally has to interpolate between angle values. But Logic is apparently programmed to do that interpolation directly EVEN WHEN the panning value goes from extremely low to extremely high or vice versa. So, instead of Logic "realizing" that a change of paning angle from 2 to 359 should be interpreted as a slight move across the front center axis, it apparently interpolates UPWARD from 2 to 359, creating a wild clockwise circular swoop. So, ...
    I can't see how I can fool Logic into not doing that, and "smoothing" the transistion with additional data doesn't really solve the problem if it's occuring internally in Logic's samplewise interpolation scheme.

Maybe you are looking for