desktop application - Im trying to add items to a text field in Java using NetBeans 6.9.1 -
my code in action button press is:
@action public void add() { int miles=integer.parseint(jtextfield1.gettext()); double km=miles/.621; jtextarea1.add } as can see, didn't finish jtextarea1 code. want add new line every button press "1 mile(s) = xx km" (with xx being km variable)
i'm not clear on how add text jtextarea1 though, second day using desktopapplications, did console apps.
call:
jtextarea1.append("text goes here\n"); also, start reading oracles swing tutorial instead posting new question every 5 minutes.
regards.
Comments
Post a Comment