aspose file tools*
The moose likes Beginning Java and the fly likes customized pop-up dialog Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "customized pop-up dialog" Watch "customized pop-up dialog" New topic
Author

customized pop-up dialog

jhon max
Ranch Hand

Joined: Jan 06, 2010
Posts: 45



popUpFrameClass


what im trying to do with this pop-up frame class is to be as flexible as possible.. something like JOptionPane...
but im getting error with the commented part in the inventory class...
im sorry for posting the long code...

but please try to do this

In the expiration date text field (setTheExpDate).. try to input an error (which is a string that has more than 6 characters), try to press it , and you can notice
for the second time the action of tat text field... the pop-Up frame's label disappears...

how can i resolve this..? please help..

what i want is.. the user can define a title and a message for my pop-up frame....

i hope you understand my concern.. thanks...!
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

It won't compile without CurrentDate. ExpirationDate and HelpOption.


[My Blog]
All roads lead to JavaRanch
jhon max
Ranch Hand

Joined: Jan 06, 2010
Posts: 45
sorry sir ... i forgot.... i beg your pardon ..

heres the three class

CurrentDate class



ExpirationDate Class



HelpOption
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

the pop-Up frame's label disappears...

Sorry, I can't see anything disappearing.

Apart from that, how are CurrentDate and ExpirationDate classes different ? Can't you use only one of them ?
Tim Madsen
Greenhorn

Joined: Jan 19, 2010
Posts: 2
maybe you have to call the repaint() when asking the user to input, so that it can refresh ?

Im not sure.
jhon max
Ranch Hand

Joined: Jan 06, 2010
Posts: 45
oh my god! .. whats going on with my IDE... when i tried to input an INVALID date on the setExpField(). the first execution of its command makes the pop-frame fine
but after it ... i dont see the LABEL anymore....

darn... im really having problem with compiling, i even experience WEIRD outputs such as duplicate outputs of strings(string statements) ... other fellow forums mates try to run the same code but they dont encounter such
problem that i use to see..

well regarding with ExpirationDate class and CurrentDate class.. i also thought of "why cant i make those two as one".. but i want to make a different children class to generate
an expiring date and a current date...

Apart from that, how are CurrentDate and ExpirationDate classes different ? Can't you use only one of them ?

ill take this as an oppurtinity to ask your opinion sir...

regarding with the fact that i want a different class to act as the same with DATE... did i make an efficient way?

well these two classes that looks the same... is just for my Inventory class not a utility class for general purpose...
but please i want to have your opinion....


and one last thing to ask.... are there any ways to solve my problem with my PopUpFrame class? is there any way that i can do to define my own Dialog?

sorry to ask many questions but i need to finish this program as soon as possible


thank you for spending your time to compile my big bunch of dirty work sir Christophe Verré Thanks....
jhon max
Ranch Hand

Joined: Jan 06, 2010
Posts: 45
sir i FOUND the error!! i have an idea why does the label disappear!

when you compile it in your IDE . ofcourse the background of the pop-up-frame is just the default color of the JFrame class right?

i tried to remove the background sir... and then it runs fine!! ...

but how can i resolve the problem regarding with the background? T_T...
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: customized pop-up dialog