Java程序辅导

C C++ Java Python Processing编程在线培训 程序编写 软件开发 视频讲解

客服在线QQ:2653320439 微信:ittutor Email:itutor@qq.com
wx: cjtutor
QQ: 2653320439
CS342Lab07 Package   Class  Tree  Deprecated  Index  Help   PREV CLASS   NEXT CLASS FRAMES    NO FRAMES     All Classes SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD code Class CS342Lab07 java.lang.Object java.awt.Component java.awt.Container java.awt.Panel java.applet.Applet javax.swing.JApplet code.CS342Lab07 All Implemented Interfaces: java.awt.event.ActionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.RootPaneContainer public class CS342Lab07 extends javax.swing.JApplet implements java.awt.event.ActionListener This class is the main class for my CS342 Assignment 6. It requires that that I use JInternalFrames and JMenus with shortcuts and mnemonics. Each internal frame is a sperate class stored in a seperat .java file. One requirment was that the source code and compiled code be in seperate directories and that it all be in a .jar file. It should run as both an applet and an application. Author: Andrew Strickland See Also: Serialized Form Nested Class Summary   Nested classes/interfaces inherited from class javax.swing.JApplet javax.swing.JApplet.AccessibleJApplet   Nested classes/interfaces inherited from class java.applet.Applet java.applet.Applet.AccessibleApplet   Nested classes/interfaces inherited from class java.awt.Panel java.awt.Panel.AccessibleAWTPanel   Nested classes/interfaces inherited from class java.awt.Container java.awt.Container.AccessibleAWTContainer   Nested classes/interfaces inherited from class java.awt.Component java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy   Field Summary (package private)  javax.swing.JMenu aboutMenu             (package private)  javax.swing.JInternalFrame audio             (package private)  javax.swing.JMenuItem audioItem             (package private)  javax.swing.JInternalFrame author             (package private)  javax.swing.JMenuItem authorItem             (package private)  java.awt.Container c             (package private)  java.awt.Color color             (package private)  javax.swing.JInternalFrame compHelp             (package private)  javax.swing.JMenuItem compItem             (package private)  javax.swing.JInternalFrame currentFrame             (package private)  javax.swing.JDesktopPane desktop             (package private)  javax.swing.JInternalFrame exeHelp             (package private)  javax.swing.JMenuItem exeItem             (package private)  javax.swing.JMenu labMenu             (package private)  javax.swing.JInternalFrame learned             (package private)  javax.swing.JMenuItem learnedItem             (package private)  javax.swing.JInternalFrame problem             (package private)  javax.swing.JMenuItem problemItem               Fields inherited from class javax.swing.JApplet accessibleContext, rootPane, rootPaneCheckingEnabled   Fields inherited from class java.awt.Component BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT   Fields inherited from interface java.awt.image.ImageObserver ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH   Constructor Summary CS342Lab07()               Method Summary  void actionPerformed(java.awt.event.ActionEvent event)           The actionPerformed function handles what happens when the user selects somthing from a drop down menu.  void createFrames()           The createFrames method simply creates the internal frames to be used in the applet and stores them in variables for later use.  void createMenus()           The createMenus function creates all the menu bar, the menus, and all the menu items to be used by the application.  void createShortKeys()           The createShortKeys function sets accelerators for all the menu items and sets mnemonics for all the menus and menu items used in the applet.  void init()           This is the first function called by the applet. static void main(java.lang.String[] args)           The main method is used to convert the applet into an application.   Methods inherited from class javax.swing.JApplet addImpl, createRootPane, getAccessibleContext, getContentPane, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isRootPaneCheckingEnabled, paramString, remove, repaint, setContentPane, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update   Methods inherited from class java.applet.Applet destroy, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus, start, stop   Methods inherited from class java.awt.Panel addNotify   Methods inherited from class java.awt.Container add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree   Methods inherited from class java.awt.Component action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle   Methods inherited from class java.lang.Object clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait   Field Detail aboutMenu javax.swing.JMenu aboutMenu labMenu javax.swing.JMenu labMenu authorItem javax.swing.JMenuItem authorItem problemItem javax.swing.JMenuItem problemItem audioItem javax.swing.JMenuItem audioItem exeItem javax.swing.JMenuItem exeItem compItem javax.swing.JMenuItem compItem learnedItem javax.swing.JMenuItem learnedItem author javax.swing.JInternalFrame author problem javax.swing.JInternalFrame problem audio javax.swing.JInternalFrame audio exeHelp javax.swing.JInternalFrame exeHelp compHelp javax.swing.JInternalFrame compHelp learned javax.swing.JInternalFrame learned currentFrame javax.swing.JInternalFrame currentFrame desktop javax.swing.JDesktopPane desktop c java.awt.Container c color java.awt.Color color Constructor Detail CS342Lab07 public CS342Lab07() Method Detail init public void init() This is the first function called by the applet. It will call all the other functions in turn to run the applet properly. Overrides: init in class java.applet.Applet createFrames public void createFrames() throws java.beans.PropertyVetoException The createFrames method simply creates the internal frames to be used in the applet and stores them in variables for later use. It throws PropertyVetoException because the JInternalFrame.setClosed() function requires that it does. Throws: java.beans.PropertyVetoException createMenus public void createMenus() The createMenus function creates all the menu bar, the menus, and all the menu items to be used by the application. createShortKeys public void createShortKeys() The createShortKeys function sets accelerators for all the menu items and sets mnemonics for all the menus and menu items used in the applet. actionPerformed public void actionPerformed(java.awt.event.ActionEvent event) The actionPerformed function handles what happens when the user selects somthing from a drop down menu. A new internal frame is created if it wasn't already opened, added to the desktop, and moved to the front. Specified by: actionPerformed in interface java.awt.event.ActionListener Parameters: event - main public static void main(java.lang.String[] args) The main method is used to convert the applet into an application. A new frame is started, and the applet is run in that frame. Parameters: args - Package   Class  Tree  Deprecated  Index  Help   PREV CLASS   NEXT CLASS FRAMES    NO FRAMES     All Classes SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD