How do I setText() with a long???

textbox.setText(long.toString());

Only if it is a Long, and not a long. If it is a long, then, the proper way is

jvar.setText(String.valueOf(longvar));

The "quick and dirty" or improper, but still functional way is

jvar.setText("" + longvar);

Also have a look at JFormattedTextField

Also have a look at JFormattedTextField

Great. Hey thanks a lot.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.