Manning's Countdown to 2014
. Use discount code crdotd14 all month for 50% off every deal.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Creating a Class Object from the Input from a JTextField.
Joined: Oct 31, 2001
Jan 15, 2002 18:48:00
Instead of going:
MyClass ryan = new MyClass();
can you take the Input from a
and Use it for the Object name of MyClass?
If So where should I continue to look, or what other option do I have.
Having fun while I am learning
Joined: Jan 07, 2002
Jan 15, 2002 18:59:00
Yes, look at
Class.forName("classname"). This returns a Class object of the type in the argument.
Class myClass = Class.forName("classname")
Object myNewObject = myClass.newInstance().
With a little knowledge, a
cast iron skillet
is non-stick and lasts a lifetime.
subject: Creating a Class Object from the Input from a JTextField.
How to add JtextField to JOptionPane
code generation/bytecode modification
Passing Customized objects
Get data from jtext field
reading data from Jtextfield on jpanel on jframe
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013