× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Stefano, JComponent is a class in Java's Swing packages.  The class name 
"com.sun.java.swing.JComponent" is the old naming convention for Swing used 
prior to Java 2.  Sun renamed the Swing packages in 1998 or 1999.  The history 
is a little complicated, but if you are using JDK1.2 or above on your 
workstation, you will not have the "com.sun.java.swing" package.  Instead, it 
is named "javax.swing", and the class name is "javax.swing.JComponent".  This 
would cause the error you see in your compile.

Older versions of IBM's toolbox use the older naming convention.  The latest 
version of JTOpen should use the "javax.swing" names (correct me if I'm wrong, 
David!).  You can get JTOpen from the JTOpen site:

http://oss.software.ibm.com/developerworks/opensource/jt400/

Hope this helps!

Joe


---------- Original Message ----------------------------------
From: "Stefano Arienti" <sarienti@tiscalinet.it>
Date: Wed, 4 Apr 2001 13:59:20 +0200

>  When I try to compile the source below I have an error message : 
>
>          --------------------------- Compiler Output 
>>---------------------------
>  DisplayAS400Jobs.java:0: Class com.sun.java.swing.JComponent not found >in 
>class com.ibm.as400.vaccess.AS400DetailsPane.
>
>
>  Can someone tell me why ?? 
>  Thank you
>
>
>
>  -------------------------------------------
>  import java.io.*;
>  import java.awt.*;
>  import java.awt.event.*;
>  import java.util.*;
>  import java.lang.Object.*;
>  import javax.swing.event.*;
>  import javax.swing.*;
>  import com.ibm.as400.access.*;
>  import com.ibm.as400.vaccess.*;
>
>
>  public class DisplayAS400Jobs extends JFrame
>    {
>   private AS400 system;
>   private Frame frame;
>   AS400DetailsPane detailsPane;
>   VJobList joblist;
>   JMenuBar menuBar = new JMenuBar();
>   JMenuItem exit;
>   JPanel JobsList;
>
>   public DisplayAS400Jobs()
>    {
>   super ("Display AS400 Jobs");
>
>   setJMenuBar(menuBar);
>   JMenu fileMenu = new JMenu("File");
>   fileMenu.setMnemonic('F');
>   HandleControlMenuItem itemcontrolHandler = new >HandleControlMenuItem();
>   exit = fileMenu.add("Exit");
>   exit.addActionListener(itemcontrolHandler);
>   menuBar.add(fileMenu);
>
>
>  // Build Jobs List
>     JobsList = new JPanel();
>     JobsList.add(createJobsList());
>
>  // Add components to Frame
>       getContentPane().add(JobsList, BorderLayout.CENTER);
>      }
>
>   // Create the List of Jobs
>    protected JPanel createJobsList() {
>    system = new AS400();
>    joblist = new VJobList(system);
>    detailsPane = new AS400DetailsPane();
>     try
>    {
>    detailsPane.setRoot(joblist);
>     } catch (java.beans.PropertyVetoException e) {}
>    detailsPane.load();
>    JPanel pane = new JPanel();
>    pane.setLayout(new BoxLayout(pane, BoxLayout.Y_AXIS));
>    pane.add(detailsPane);
>    return pane;
>    }
>
>  // Main Routine
>   public static void main (String args[])
>    {
>       JFrame ZFrame = new DisplayAS400Jobs();
>       ZFrame.addWindowListener(new WindowAdapter() {
>        public void windowClosing(WindowEvent e) {
>         System.exit(0);
>         }});
>       ZFrame.pack();
>       ZFrame.setVisible(true);
>     }
>
>  // Handle the action events for the menu items
>  class HandleControlMenuItem implements ActionListener
>  {
>    // Handle Menu Item Selection
>     public void actionPerformed(ActionEvent e)
>      {
>       JMenuItem source = (JMenuItem)e.getSource();
>
>  // Exit Selected
>       if (source.getText() == "Exit")
>        {System.exit(0); }
>      }
>    }
>      }
>
>

+---
| This is the JAVA/400 Mailing List!
| To submit a new message, send your mail to JAVA400-L@midrange.com.
| To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
| To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner: joe@zappie.net
+---

+---
| This is the JAVA/400 Mailing List!
| To submit a new message, send your mail to JAVA400-L@midrange.com.
| To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
| To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner: joe@zappie.net
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.