Skip to main content



      Home
Home » Newcomers » Newcomers » JOptionPane HELP PLEASE (New)(Need help with importing, especially with javax.swing.JOptionPane)
JOptionPane HELP PLEASE (New) [message #1776498] Thu, 16 November 2017 23:25 Go to next message
Eclipse UserFriend
Hello,

I need help to know how to import classes.
Especially the javax.swing.JOptionPane

(My Java package(if that's the way it's called...?) is linked below. There is french(CA) notes in my program, but those are useless)

Here's my code :

(Beginning)

import javax.swing.JOptionPane;

public class Bonjour {

	public static void main(String[] args) {

		JOptionPane.showMessageDialog(null, "Voici mon premier programme java");
	}
}

(End)

I would just like it show "Voici mon premier programme Java" in a window.
I have no error, but when I run it, nothings happen...
No window appears, nothing in console, anywhere....

Help me please, I'm so disappointed that my very first program is a total fail, and it should be so easy...

Thanks :)
  • Attachment: Bonjour.java
    (Size: 0.38KB, Downloaded 205 times)
Re: JOptionPane HELP PLEASE (New) [message #1776515 is a reply to message #1776498] Fri, 17 November 2017 03:34 Go to previous messageGo to next message
Eclipse UserFriend
You're are sure you're not just posting this for links to youtube in your Javadoc? Hello world programs just start just by printing to the console. Does that work? Is this *.java file in a Java Project's source folder?
Re: JOptionPane HELP PLEASE (New) [message #1776562 is a reply to message #1776515] Fri, 17 November 2017 12:47 Go to previous messageGo to next message
Eclipse UserFriend
I'm sorry for the link, really not my intention. As mentioned, there's french personal notes and I just didn't think about removing them, since they are "part of the program" and was not sure if it would change something if I erased it.

I have no problem printing Hello World, or anything else in console, but the problem comes when I want to import a new class (Like JOptionPane) and to show text in the window.

Nothing appears... I really don't understand :(
Re: JOptionPane HELP PLEASE (New) [message #1776592 is a reply to message #1776562] Sat, 18 November 2017 03:23 Go to previous message
Eclipse UserFriend
This forum is for helping to use Eclipse technology (the IDE and the frameworks), not for helping understand how to use some arbitrary Java framework. Have you tried things like setting a breakpoint and stepping into that method, or adding a print statement before and after the showMessageDialog to see if the code is executing at all?
Previous Topic:Error opening eplipse first time
Next Topic:Eclipse does not finish to updatepacks
Goto Forum:
  


Current Time: Sat Jun 21 01:43:44 EDT 2025

Powered by FUDForum. Page generated in 0.09516 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top