Okay ra ba dili gamiton ang public boolean action (Event e, Object o) bisan dili ko maghimo ug Applet? Gamiton ra nako siya sa application, .jar.
Okay ra ba dili gamiton ang public boolean action (Event e, Object o) bisan dili ko maghimo ug Applet? Gamiton ra nako siya sa application, .jar.
-action(Event e, Object o); is already deprecated as of jdk1.1, instead use actionPerformed() of ActionListener
-as for your question, dependi kng imng application contains controls/components that fires an event when pressed or selected e.g Button
Oo naa'y buttons akong gibuhat.
Uhm, what do you mean 'bout deprecated?
Buttons instead of JButtons ako gigamit, Panels instead of JPanels, Frame instead of JFrame mao nag-gamit ko ug action () instead of ActionListener kay d man mo meet ang req.
-magamit raman ang ActionListener either from swing or awt components
-post daw sa imo code snipplet where nag gamit kag action()
boolean clearScreen = true; . - Anonymous - 38YS5UuS - Pastebin.com
What do you mean about deprecated sir?boolean clearScreen = true;
...
input = new TextField (10);
...
public boolean action (Event evAction, Object objAction) {
Double tempRes;
if ("log".equals (objAction)) {
tempRes = new Double (input.getText ());
tempRes = Math.log10 (tempRes);
input.setText(String.valueOf (tempRes));
clearScreen = true;
}
else if ("ln".equals (objAction)) {
tempRes = new Double (input.getText ());
tempRes = Math.log (tempRes);
input.setText (String.valueOf (tempRes));
clearScreen = true;
}
return clearScreen;
}
By the way, dili Applet akong gihimo but Java application jud.
Last edited by technowar; 03-06-2010 at 09:51 AM.
deprecated in java means that method is already obsolete and was updated with new method name and new features
Similar Threads |
|