× 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.


  • Subject: DisplayAS400Jobs
  • From: "Stefano Arienti" <sarienti@xxxxxxxxxxxxx>
  • Date: Wed, 4 Apr 2001 13:59:20 +0200

Title:
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); }
    }
  }
    }

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.