Content Pane Error in Code

This is an extract from my programme. I get 2 errors:
Error: 300:method getcontentPane() not found in class DBLaender at line 43, column 33
Error: 300. variable borderLayout1 not found in class DBLaender at line 44, column 27
Please can you help me and tell me what's wrong?
public class DBLaender {
JPanel contentPane;
Database database1 = new Database();
QueryDataSet queryDataSet1 = new QueryDataSet();
JdbNavToolBar jdbNavToolBar1 = new JdbNavToolBar();
JPanel jPanel1 = new JPanel();
JPanel jPanel2 = new JPanel();
JPanel jPanel3 = new JPanel();
JdbTextField jdbTextField1 = new JdbTextField();
JdbTextField jdbTextField2 = new JdbTextField();
JdbTextField jdbTextField3 = new JdbTextField();
JdbTextArea jdbTextArea1 = new JdbTextArea();
JdbTextArea jdbTextArea2 = new JdbTextArea();
JdbTextArea jdbTextArea3 = new JdbTextArea();
public static void main(String[] args) {
public DBLaender() {
try {
jbInit();
catch(Exception e) {
e.printStackTrace();
private void jbInit() throws Exception {
contentPane = (JPanel) this.getContentPane();
contentPane.setLayout(borderLayout1);

DBLaender Class should extend from a JFrame or its siblings and borderLayout1 is not defined

Similar Messages

  • Facebook games not loading, Error message was SSL peer rejected a handshake message for unacceptable content. (Error code: ssl_error_illegal_parameter_alert).

    The facebook game not loading properly, it getting struck, when i refresh the page Error message was showing. The error message was
    "Secure Connection Failed
    An error occurred during a connection to imabigfanof.criminalcasegame.com. SSL peer rejected a handshake message for unacceptable content. (Error code: ssl_error_illegal_parameter_alert)
    The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
    Please contact the website owners to inform them of this problem. Alternatively, use the command found in the help menu to report this broken site. "
    I had reset the firefox, but it doesn't fix my problem. I had checked same page in other browsers, like Google Chrome & Internet Explorer. I didnot get problem in that browser, The problem coming in firefox browser only.
    Firefox is my best web browser, Please help me to fix this problem.
    Waiting for ur kind reply...

    Thank you for the advice, I do run Kaspersky and will disable it to see if this will work and report back so that if there is others that are experiencing the same problem can also bennefit from this advice

  • Pan And Zoom Overlay Content Generation Error Invalid Asset

    I am attempting to create a Pan AND Zoom overlay, I can get the overlay to work if I choose Pan only, but if I choose Pan AND Zoom and then go to preview, I get the following error: "Content Generation Error: Invalid Asset". Any ideas? I am using V17 of the tools, (the latest before todays update)

    What image file format are you trying to turn into a Pan-and-Zoom overlay?? I encountered this error last night (I found this thread while searching here for "Invalid Asset"), and determined that it was because I had placed a .PSD file. Once I converted the image to JPG, I got it to work.

  • 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

  • "Error Result code = -43" AND "Audio file not found"

    In Garageband I was trying to  click Join, but kept getting "Error Result code = -43"
    What does this mean?
    Also, I thought saving the file and restarting Garageband would help, but upon re-opening the program BIG problem: the file (just this one, others are opening fine) has this error message upon opening "Audio file “07 I See the Light.aif” not found!"

    mcgregorsgal wrote:
    so do I have to basically start over?
    for that one recording, it looks like it.
    the error -43 is a system level error, so i HIGHLY doubt this will help, however you can ctrl-click the project file, choose Show Package Contents, open the media folder and preview any audio files in there to see if the missing file is there, but in all likelihood, you will need to re-record it

  • How to add a text area in a Content pane..?

    Hi,
    I created a content pane with 5 buttons. One of them is a quit button, and I was able to create an "system.exit(0)" event handling for him. My problem is.. I have 4 other buttons, and I want them to show some text when I click them. How do I add a text area bellow my content pane..?
    Copy/paste my code to see what im talking about :) :
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class Interface extends JFrame {
    public Interface() {
    Container contentPane = getContentPane();
    contentPane.setLayout(new FlowLayout());
    JButton button1 = new JButton("Test1");
    JButton button2 = new JButton("Test2");
    JButton button3 = new JButton("Test3");
    JButton button4 = new JButton("Test4");
    JButton button5 = new JButton("Quit");
    ButtonHandler handler = new ButtonHandler();
    button5.addActionListener( handler );
    contentPane.add(button1);
    contentPane.add(button2);
    contentPane.add(button3);
    contentPane.add(button4);
    contentPane.add(button5);
    contentPane.setBackground(Color.orange);
    addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) {
    System.exit(0);
    public static void main(String args[]) {
    Interface window = new Interface();
    window.setLocation(250,350);
    window.setTitle("FlowLayout");
    window.pack();
    window.setTitle("Test");
    window.setVisible(true);
    public class ButtonHandler implements ActionListener {
    public void actionPerformed( ActionEvent e )
    System.exit(0);
    Thanks alot! :)

    By default the content pane of the JFrame uses a Border Layout. So you should:
    1) Create a JPanel
    2) Set the layout of the JPanel to FlowLayout
    3) add the buttons to the panel
    4) add the panel to the content pane
    5) add your text area to the content pane
    Read this section from the Swing tutorial on "Using Layout Managers":
    http://java.sun.com/docs/books/tutorial/uiswing/layout/using.html

  • Error in crawl log "Error while crawling LOB contents. ( Error caused by exception: Microsoft.BusinessData.Infrastructure.BdcException The shim execution failed unexpectedly - The method or operation is not implemented..; SearchID "

    Hi 
    I get the following error in my crawl logs
    "Error while crawling LOB contents. ( Error caused by exception: Microsoft.BusinessData.Infrastructure.BdcException The shim execution failed unexpectedly - The method or operation is not implemented..; SearchID "
    Because of this i suspect, the search results are not including those aspx pages marked as "Hide physical urls from search".
    This error is not available in the another environment where the aspx pages are coming in the results.
    Thanks
    Joe

    Hi Joe,
    Greetings!
    Reset the index and re-crawl. That usually clears it
    If you are using NTLM authentication, then make sure that you specified the PassThrough authentication for crawling
    Probably you need to debug the BDC code that underlies the external content types.
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/41a86c43-151d-47cd-af73-967a4c940611/lotus-notes-connector-error-while-crawling-lob-contents?forum=sharepointsearch
    Please remember to click 'Mark as Answer' on the answer if it helps you

  • Content generation error. Failed to open the InDesign file.

    Hey all -
    In importing an article to a folio, I just received this error:
    "Content generation error.
    Failed to open the InDesign file. Please confirm the file can be opened in InDesign."
    The file is open right now in InDesign. I can close it and reopen it with no errors.
    I've tried resaving the article to a new file. No help.
    I tried creating a new folio and importing the article there. No help.
    All links are good. It's a simple file with images, a scrolling pane, and some buttons that link to other articles.
    Anyone else run into this problem? Any solutions?
    Thanks!

    Im getting this error also....?
    Want to avoid inporting each artical on at a time. Need to import multiple articals at once.
    Thanks.

  • Problem with content pane

    hi,
    if I have to add three different toolbars in same content pane.
    If I add these, each one of them gets overwrite over another. and only last one toolbar gets visible. please help. Also, I need the toolbar to keep top most when i dock them.

    shamail says - "I guess you didnt read the message carefully"
    late4ever says = "u can't add more than 1 toolbar on top"
    Did either of you bother to take the time to read the tutorial on "Using Layout Managers". A JToolBar is simply a component. Multiple components can be added to a container. By default the content pane uses a BorderLayout which only accepts 5 components (Center, North, South, East, West) which is why when you keep adding components to the same area you can only see the last one.
    When you create a JPanel, by default it uses a FlowLayout. When you add components they get added to the right of the previous component, which was why I gave you the sample code.
    I thought my previous answer was straight forward so I only included a piece of code. Here is a complete program you can run:
    import javax.swing.*;
    public class MultipleToolBars extends JFrame
         public MultipleToolBars(String strName)
              this.setTitle(strName);
              JPanel jp1 = new JPanel();
              JToolBar jtb1 = new JToolBar("tool1");
              JToolBar jtb2 = new JToolBar("tool2");
              JToolBar jtb3 = new JToolBar("tool3");
              JButton jb1 = new JButton("JB1");
              JButton jb2 = new JButton("JB2");
              JButton jb3 = new JButton("JB3");
              JButton jb4 = new JButton("TOOL1");
              JButton jb5 = new JButton("TOOL2");
              JButton jb6 = new JButton("TOOL3");
              JButton jb7 = new JButton("BUTTON1");
              JButton jb8 = new JButton("BUTTON1");
              JButton jb9 = new JButton("BUTTON2");
              jtb1.setFloatable(true);
              jtb2.setFloatable(true);
              jtb3.setFloatable(true);
              jtb1.add(jb1);
              jtb1.add(jb2);
              jtb1.add(jb3);
              jtb2.add(jb4);
              jtb2.add(jb5);
              jtb2.add(jb6);
              jtb3.add(jb7);
              jtb3.add(jb8);
              jtb3.add(jb9);
              jp1.add(jtb1);
              jp1.add(jtb2);
              jp1.add(jtb3);
              getContentPane().add(jp1);
         public static void main(String[] args)
              MultipleToolBars mtb = new MultipleToolBars("test");
              mtb.setSize(600, 75);
              mtb.setVisible( true );

  • Error status code 400 with the description Message mapping failed

    Hi,
    I tried to build RFID outbound scenario using ECC 5.0, XI and AII 2.1.
    When I send IDOC message:AIDOPMSG.AIDOP01 from ecc 5.0 to XI(ouput message type is OperationalIn and message mapping is OperationalInTo), i get following error:
    <SAP:Code area="INTERNAL">HTTP_RESP_STATUS_CODE_NOT_OK</SAP:Code>
      <SAP:P1>400</SAP:P1>
      <SAP:P2>Message mapping failed</SAP:P2>
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText>Message mapping failed</SAP:AdditionalText>
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>HTTP response contains status code 400 with the description Message mapping failed Boundary SAP_57D7D47469E09543A1EA0002CBDA0492_END could not be found</SAP:Stack>
    I am using standard AUTO-ID 2.1 XI contents. If any of you have encountered such error message, then could you please help me understand the meaning and how to fix it.
    thanks in advance,
    Ashit

    hi Ashit,
    take a look at my weblog on how to test your mapping:
    /people/michal.krawczyk2/blog/2005/09/16/xi-how-to-test-your-mapping-in-real-life-scenarios
    maybe with this you'll be able to find out the error
    Regards,
    michal

  • Resetting JApplet Content Pane

    I have an applet which needs to wait on another applet in the page being loaded before the GUI components can be rendered on the screen. My plugin appears to load the applets in the order that the HTML tags appear on the page, which is exactly the wrong order. Therefore, I spawned off a task to check for the other applet and load the component when it is present. According to debug output, all goes well. No exceptions are thrown and no debug output indicates any exceptions or error conditions being triggered. Instead, output indicates the GUI getting built and the content pane getting set to the new Container. Unfortunately, this new content pane never displays. Instead, the applet becomes a never-repainted box. What about JApplet and painting am I missing?

    You need to do your modifications to Swing components on the AWT thread after the components have be realized, i.e.
                java.awt.EventQueue.invokeLater(new Runnable() {
                    public void run() {
                            ////  make your changes to Swing components here
                });

  • 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??

  • Content pane acting wacky

    OK, i am trying to use JPanel to put all of my buttons on the bottom of the screen. I got that part to work, but when ever I add a textField to the content pane, the label disappears and the textField is never visible. Here is my code.
              Container container = getContentPane();
              buttons = new JButton[ 3 ];
              buttonPanel = new JPanel();
              buttonPanel.setLayout( new GridLayout( 1, buttons.length ) );
              for ( int count = 0; count < buttons.length; count++) {
                   buttons[ 0 ] = new JButton( "Deal" );
                   buttons[ 1 ] = new JButton( "Shuffle" );
                   buttons[ 2 ] = new JButton( "Exit" );
                   buttons[ count ].addActionListener( this);
                   buttonPanel.add( buttons[ count ] );
              }// end for loop
              container.add( buttonPanel, BorderLayout.SOUTH );
              player1Label = new JLabel( "Player 1: ");
              container.add( player1Label );
              player1Field = new JTextField( 5 ) ;
              player1Field.setEditable( false );
              container.add( player1Field );
              setSize( 425, 150 );
              setVisible( true );

    OK, got the pane working right! thanks
    here's what I did.
              // get content pane and create layout
              Container container = getContentPane();
              // create label grid
              labels = new JLabel[3];
                   labels[ 0 ] = new JLabel( "Player 1: ");
                   labels[ 1 ] = new JLabel( "Player 2: ");
                   labels[ 2 ] = new JLabel( "Shuffle cards to begin" );
              labelPanel = new JPanel();
              labelPanel.setLayout( new GridLayout( 3, labels.length ) );
              for ( int count = 0; count < labels.length; count++) {
                   labelPanel.add( labels[ count ] );
              }// end for loop
              container.add( labelPanel, BorderLayout.WEST );
              // create text field grid
              textFields = new JTextField[ 3 ];
                   textFields[ 0 ] = new JTextField( 20 );
                   textFields[ 1 ] = new JTextField( 20 );
                   textFields[ 2 ] = new JTextField( 20 );
              textFieldPanel = new JPanel();
              textFieldPanel.setLayout( new GridLayout( 3, textFields.length ) );
              for ( int count = 0; count < textFields.length; count++) {
                   textFields[ count ].setEditable( false );
                   textFieldPanel.add( textFields[ count ] );
              }// end for loop
              container.add( textFieldPanel, BorderLayout.EAST );     
              // create button grid          
              buttons = new JButton[ 3 ];
                   buttons[ 0 ] = new JButton( "Deal" );
                   buttons[ 1 ] = new JButton( "Shuffle" );
                   buttons[ 2 ] = new JButton( "Exit" );
              buttonPanel = new JPanel();
              buttonPanel.setLayout( new GridLayout( 1, buttons.length ) );
              for ( int count = 0; count < buttons.length; count++) {
                   buttons[ count ].addActionListener( this );
                   buttons[ 0 ].setEnabled( false );
                   buttonPanel.add( buttons[ count ] );
              }// end for loop
              container.add( buttonPanel, BorderLayout.SOUTH );
              setSize( 425, 150 );
              setVisible( true );
         }

  • Content Pane Question

    I've noticed that there seem to be two common ways in which a Content Pane is defined. I've included examples of each below and am interested in whether there's any reason that either might be preferable to use over the other.
    Thanks very much.
    EXAMPLE 1 _______________________________
    public static void main(String[] args) {   
    VPA vpa = new VPA();
    JFrame frame = new JFrame("VPA");
    frame.setContentPane(vpa.contentPanel);
    public VPA() {
    contentPanel = new JPanel();
    EXAMPLE 2 ______________________________________
    public static void main(String[] args) {     
    VPA vpa = new VPA();
    public class OtherClass extends JFrame {
    public OtherClass() {
    Container contentPane = getContentPane();
    }

    I usually create my own content pane then add it to the frame like this:
    public class test extends JFrame{
        public test{
         JPanel contentPane = new JPanel();
         //add stuff to contentPane
         setContentPane(contentPane);
    }When working with frames and swing, JPanel is usually your base content pane. Also, your first code example will not work, don't bother working with it. My example is closest to the second one.

  • Installation Error: Exit Code 7 on macOS10.6.8

    I downloaded Adobe Premiere Elements from the online store today,
    and cannot install the software on my mac os 10.6.8
    I get the following errors:
    Exit Code: 7
    -------------------------------------- Summary --------------------------------------
    - 0 fatal error(s), 16 error(s), 5 warning(s)
    WARNING: Payload cannot be installed due to dependent operation failure
    WARNING: Payload cannot be installed due to dependent operation failure
    WARNING: Payload cannot be installed due to dependent operation failure
    WARNING: Payload cannot be installed due to dependent operation failure
    WARNING: Payload cannot be installed due to dependent operation failure
    ERROR: Custom Action for payload {81B0CE07-2DA2-4c59-BA46-BC81E0656491} Common returned error. Failing this payload.
    ERROR: Custom Action for payload {2B3B0E84-7724-48ed-BEA4-15F5ED8FBAD7} Presets returned error. Failing this payload.
    ERROR: Custom Action for payload {A29C9F23-87F1-4651-ADF7-2CB7CC7F79B0} HD returned error. Failing this payload.
    ERROR: Custom Action for payload {78C17FAA-2368-4505-BED6-C6F56F923AE0} SD returned error. Failing this payload.
    ERROR: Custom Action for payload {A85C9905-3D8E-41FF-A031-15DB7EFFA6E5} PreMacContentInstaller returned error. Failing this payload.
    ERROR: The following payload errors were found during install:
    ERROR:  - PreMacContentInstaller_LangPacken_US: Install failed
    ERROR:  - Presets: Failed due to Language Pack installation failure
    ERROR:  - HD_LangPackHDOther: Install failed
    ERROR:  - Common_LangPackCommonOther: Install failed
    ERROR:  - SD: Failed due to Language Pack installation failure
    ERROR:  - Common: Failed due to Language Pack installation failure
    ERROR:  - Presets_LangPackPresetsOther: Install failed
    ERROR:  - SD_LangPackSDOther: Install failed
    ERROR:  - HD: Failed due to Language Pack installation failure
    ERROR:  - PreMacContentInstaller: Failed due to Language Pack installation failure
    I've searced google throroughly and cannot find a solution.
    I would very much appreciate some help.
    Thank you in advance.

    Have you ensured you're installing the Mac installation disc and not the Windows disc -- and that you're installing from the program installation disc and not the content installation disc?

Maybe you are looking for