java链表用application怎么做

来源:百度知道 编辑:UC知道 时间:2024/06/19 05:50:43
怎么样的图形界面更直观 方便

import java.awt.*;
import java.awt.event.*;
import java.applet.*;

public class UseLinkList extends Applet implements TextListener,ActionListener
{
Label prompt1;
Label prompt2;
Label prompt3;
TextField input1;
TextField input2;
Button insert;
Button delete,b,c;
Integer data;
int index;
String msg,m;
Panel t;
LinkList mylist;
boolean a;

public void init()
{
data=null;
index=0;
mylist=new LinkList();

prompt1=new Label("输入数据");
prompt2=new Label("输入数据所在的位置(默认为头结点)");
prompt3=new Label("链表中数据的逻辑结构:");
input2=new TextField(5);
input1=new TextField(5);
insert=new Button("尾插数据");
delete=new Button("删除数据");
b=new Button("全部删除");
c=new Button("头插建表");
t=new Panel();
<