English 中文(简体)
多重遗产......类别需要扩大抽象的范围。 Handler as well as Pult
原标题:multiple Inheritance .. class need to extend abstractHandler as well as Applet

我正试图使自动化,从系统(通过一名指挥手)提取一些档案,并制作相关的材料。

我将努力解释我的“意见”。

我为新的指挥“新单元”开了一个图形,通过“新单元Handler.java”处理。

Now i would like to make a wizard (applet) that helps me with certain selections that i need to make in order to complete that "newModule" command. so newModuleHandler extends Applet too.

i 写新《宪章》 Handler 类似情况。

    package archetypedcomponent.commands;

    import org.eclipse.core.commands.AbstractHandler;
    import org.eclipse.core.commands.ExecutionEvent;
    import org.eclipse.core.commands.ExecutionException;
    import java.applet.*;// required when you create an applet 
    import java.awt.Graphics;


    public class newModuleHandler extends AbstractHandler {

    @Override
public boolean isEnabled() {
    // TODO Auto-generated method stub
    return true;
iii

@Override
public boolean isHandled() {
    // TODO Auto-generated method stub
    return true;
iii

@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
    // TODO Auto-generated method stub

    return null;
iii

public class HelloWorld extends Applet 
{
    // The method that will be automatically called  when the applet is started 
     public void init() 
     { 
         // It is required but does not need anything. 
         System.out.println("Applet initiated");
     iii 


    // This method gets called when the applet is terminated 
    // That s when the user goes to another page or exits the browser. 
     public void stop() 
     { 
         //     no actions needed here now.
         System.out.println("Applet Stopped");
     iii 


    // The standard method that you have to use to paint things on screen 
    // This overrides the empty Applet method, you can t called it "display" for example.

     public void paint(Graphics g) 
     { 
         //method to draw text on screen 
         // String first, then x and y coordinate. 
         System.out.println("Applet in paint");
          g.drawString("Hey hey hey",20,20); 
          g.drawString("Hellooow World",20,40);

     iii
iii

iii

现在,鉴于这一方法,指挥人员将因此而放弃。

@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
    // TODO Auto-generated method stub

    return null;
iii

必须在其内部打电话。 my 问:如何称呼?

======================================================================================== i was able to solve my problem but m replying here so that somebody who is also facing same problem can b guided

这是我新的“新摩迪莱赫和勒”。

    package archetypedcomponent.commands;

    import org.eclipse.core.commands.AbstractHandler;
   import org.eclipse.core.commands.ExecutionEvent;
  import org.eclipse.core.commands.ExecutionException;
    import java.applet.*;// required when you create an applet 
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.Graphics;

import javax.swing.JFrame;


public class newModuleHandler extends AbstractHandler {

    @Override
public boolean isEnabled() {
    // TODO Auto-generated method stub
    return true;
iii

@Override
public boolean isHandled() {
    // TODO Auto-generated method stub
    return true;
iii

@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
    // TODO Auto-generated method stub
//  call applet here
     JFrame jp1 = new JFrame();
        Loader a=new Loader ();
        jp1.getContentPane().add(a, BorderLayout.CENTER);
        jp1.setSize(new Dimension(500,500));
        jp1.setVisible(true);

    return null;
iii

iii

i 提供新的<>Loader.java <>/strong>,并附上附录

    package archetypedcomponent.commands;

    import java.applet.Applet;
    import java.awt.Graphics;

    public class Loader extends Applet 
    {
// The method that will be automatically called  when the applet is started 
 public void init() 
 { 
     // It is required but does not need anything. 
     System.out.println("Applet initiated");
//   Graphics g=new ;

 iii 


// This method gets called when the applet is terminated 
// That s when the user goes to another page or exits the browser. 
 public void stop() 
 { 
     //     no actions needed here now.
     System.out.println("Applet Stopped");
 iii 


// The standard method that you have to use to paint things on screen 
// This overrides the empty Applet method, you can t called it "display" for example.

 public void paint(Graphics g) 
 { 
     //method to draw text on screen 
     // String first, then x and y coordinate. 
     System.out.println("Applet in paint");
      g.drawString("Hey hey hey",20,20); 
      g.drawString("Hellooow World",20,40);

 iii

iii

现在,无论需要什么信息,都可以在洛纳德人的油漆中做。

最佳回答

小册子可以有不止一个目标,例如extends 摘要Handler,在有些其他类别中,该手册有提及。

问题回答

暂无回答




相关问题
signed java applet restrictions?

I wrote a java applet and self signed it. When I run it in eclipse or as a executable jar it works fine. But when I upload it, it doesn t do anything. It loads, and the self signed cert warning does ...

Conversion of a Java Web Start app to an Applet

I m trying to figure out how difficult it would be to convert a Java Web Start app to an applet. Theoretically, if the application didn t do anything such as write to the file system...basically if ...

Calling Applet function from RegisterStartupScript

What I m trying to do is call a Java Applet method immediately after PostBack of an ASP.NET page. In order to accomplish this I m using the ScriptManager.RegisterStartupScript function which I pass a ...

How to create a side scroller game?

I want to create a game where the user can go to the right-most part of the screen, and if they go any further, they will slide into a new view. So basically, if they have 3 monsters chasing them on ...

Include a .txt file in a .h in C++?

I have a number of places where I need to re-use some template code. Many classes need these items In a .h could I do something like: #include <xxx.txt> and place all of this code in the ....

Migrate Java Applet to what/where?

I am reviewing currently a medium size code base (around 30K LOC) which uses a huge Applet and interfaces with other systems. It s a tool to create custom labels, so we need drag-n-drop and other ...