boysoledad
Posts: 7
Nickname: lunar
Registered: Aug, 2005
Help me about code!!!
Posted: Oct 18, 2005 6:45 PM
Advertisement
i have a code file about List import java.applet.Applet; import java.awt.*; import java.awt.event.*; import symantec.itools.awt.MultiList; public class List_exa extends Applet { class SymMouse extends MouseAdapter { public void mouseClicked(MouseEvent mouseevent) { Object obj = mouseevent.getSource(); if(obj == list_sim) list_sim_mouseClicked(mouseevent); } SymMouse() { } } List list_sim; public void init() { list_sim = new List(); list_sim.addItem("Hello"); add("Earth", list_sim); } void list_sim_mouseClicked(MouseEvent mouseevent) { if(list_sim.getRows() >= 0) { int i = list_sim.getSelectedIndex(); if(i > -1) { list_sim.replaceItem("Hi", i); } } } } i want click in List string "That" and it replace string "That" within string "Hi" but when i clicked list_sim, it's not working.... Please help