Ask your own question, for FREE!
Computer Science 16 Online
OpenStudy (anonymous):

Hi all dears, can any one tell me if it is possible to close a frame in java or not.if yes ,how is it possible?

OpenStudy (anonymous):

what do you mean?

OpenStudy (anonymous):

hello?

OpenStudy (anonymous):

Hi! thanks for your attention!You know my problem is that as I make a frame in java (a class that extends Frame not JFrame)I cannot get the window close with the x button on the title bar!if it was JFrame I could use setDefaultCloseOperation() but now it is not possible:(I was looking for a way :(

OpenStudy (anonymous):

why dont you use JFrame instead?

OpenStudy (anonymous):

JFrame extends Frame

OpenStudy (anonymous):

I know!I did this!but I was curious to know the answer!you know it seems strange!anyway thanks :)

OpenStudy (anonymous):

i found something after googling http://www.roseindia.net/java/example/java/awt/AwtCloseButtonEvent.shtml

OpenStudy (anonymous):

you can also look at JFrame source code method and see how it's done there

OpenStudy (anonymous):

a thousands of thanks!It was really nice and helpful!I got it! =))

OpenStudy (anonymous):

can u help me with the question I asked in the following link , I need someone's help really: http://openstudy.com/study#/updates/4fa624bce4b029e9dc35e3cb

OpenStudy (anonymous):

i don't have an idea what reflections is

OpenStudy (anonymous):

oh!=( anyway thanks again dear friend!=)

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!