I am trying to import a bunch of java related API’s into my android project but when I import them it says it cannot find the package
here is an example of what I an trying to import
import javax.swing.BorderFactory;
import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JFileChooser;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JSpinner;
import javax.swing.SpinnerNumberModel;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
all the javax.swing classes show an error. When I go into where the java JDK was installed and look at the src.zip file I see all those classes in there so what do I do to get them to work?
Here’s what I found after a quick search on the interwebs:
Swing
How do I add the javax.swing.* packages to my libs for my android project?
Synapsis: You can’t use swing in your android project
AWT
Using awt with android
Synapsis: You can’t use the awt library directly, but you can make your own implementation of it, or use the one linked to here.