File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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().
I agree. Here's the link:
subject: Creating a Class Object from the Input from a JTextField.
Get data from jtext field
reading data from Jtextfield on jpanel on jframe
code generation/bytecode modification
Passing Customized objects
How to add JtextField to JOptionPane
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014