Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Java Frame

Posted on 1997-04-01
3
Medium Priority
?
431 Views
Last Modified: 2012-06-22
How can I don't let a user of my java application resize a frame. For example I initially resize it to 300x200. But I don't want to let the user to use the maximize button for the frame to resize it.

IMPORTANT: PLEASE ANSWER:
(1)How can I detect when the user click on the maximize button?

0
Comment
Question by:mun
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 2

Accepted Solution

by:
majkl earned 150 total points
ID: 1219353
if ( event happened on button)
 {
   resize(X, Y);
 // or in JDK 1.1
   setSize(X,Y);
//where are X and Y variables to hold preferred size to resize


0
 

Author Comment

by:mun
ID: 1219354
Edited text of question
0
 
LVL 2

Expert Comment

by:majkl
ID: 1219355
public boolean handleEvent(Event event) {


  if (event.id == Event.WINDOW_MAXIMIZE)
{
 .....
 stuff here to react
 ......
}

This should work. THere is only one problem. If user maximizes frame then there is no such event like WINDOW_MAXIMIZE
I have checked what generates event, when I maximize frame, but there is no such special event. Probably calls resize.
:(
 

0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question