I want to add a Person or a firm object to an arrayList, with a type of vehicle using JOptionPane or any other option that is available. Is there anyway to do this? To use JOptionPane to call for my method, and add it to an arraylist along with a type of vehicle?
JOptionPane is not meant for object creation, you'll have to create your objects before calling the JOptionPane visibility.