aspose file tools*
The moose likes Java in General and the fly likes Message box won't show up Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Message box won Watch "Message box won New topic
Author

Message box won't show up

Aer crp
Greenhorn

Joined: Oct 27, 2011
Posts: 2
Hi,
I am trying to teach myself Java and have just started to use message boxes to get input.
However the message boxes won't show upp unless i place them first in the code:

I dont know why it wont work unless i place the box first
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18882
    
    8

I don't understand what you mean by "place the box first". How about if you post your original code and describe your problem in a little more detail?
Aer crp
Greenhorn

Joined: Oct 27, 2011
Posts: 2
Hi,
Sorry for the slow reply. What i mean is that if i write


the message box will be displayed but if

is not the first thing that is executed then the program runs fine up until it encounters the message box function (statement? Sorry dont really know the linquo yet ).
It doesn't matter where i place the code for the message box, it won't work unless it is first in the code.
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14338
    
  22

Aer crp wrote:is not the first thing that is executed then the program runs fine up until it encounters the message box function

So, what happens if you place it somewhere else? Do you get an error message? Where would you for example want to place the code, if you're not placing it as the first thing?


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Message box won't show up