?
Solved

Java Frame

Posted on 1997-04-01
3
Medium Priority
?
430 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

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

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

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses
Course of the Month13 days, 8 hours left to enroll

801 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