#JOptionPane not functioning.

4 messages · Page 1 of 1 (latest)

vocal orchid
#

I am following a tutorial on java since I am now learning java (duh... lol) and he mentions a GUI so I followed along, except when I attempted to imoort the package it had a squiggly red line saying that the JOptionPane could not be accessed and when i ran it it syas "java.lang.Error: Unresolved compilation problem: JOptionPane cannot be resolved

import javax.swing.JOptionPane;
public class Main {

    public static void main(String[] args) {
                String username = JOptionPane.showInputDialog("ENTER YOUR NAME: ");
      }

}

that is the code I used INDENTS ARE NOT ACCURATE ON THIS CODE BUT IT IS PROPERLY INDENTED IN MY CODE.

woven sandBOT
#

This post has been reserved for your question.

Hey @vocal orchid! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

woven sandBOT
#

💤 Post marked as dormant

This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.