Solved

How to disable frame resizing

Posted on 2000-03-21
10
460 Views
Last Modified: 2012-05-04
How do i disable the resizing of an awt frame in java
0
Comment
Question by:snataraj
[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
  • 5
  • 4
10 Comments
 
LVL 2

Expert Comment

by:muraliram
ID: 2640089
Dear snataraj,

 Try teh following.

Frame f=new Frame("Hello");
f.resize(200,200);
f.setResizable(false);

This will work.


Bye

Murali
0
 
LVL 1

Expert Comment

by:yogeshr
ID: 2640116
use setResizable(false) method after the frame is initiliased.
0
 
LVL 2

Expert Comment

by:muraliram
ID: 2640119
Dear snataraj,

I think I can change this to answer. Try teh following.

Frame f=new Frame("Hello");
f.resize(200,200);
f.setResizable(false);

This will work.


Bye

Murali

0
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 
LVL 2

Accepted Solution

by:
muraliram earned 50 total points
ID: 2640177
Dear snatraj,

  Why you have rejected the answer.Tell the reason also. It will work if the code is properly written. This is the working code just I have tested.Don't reject the answers before testing it.Following id the full program

import java.awt.*;

public class t extends Frame
{
      
      public t()
      {
        this.setSize(200,200);
        this.show();
        this.setResizable(false);
                    
      }
      
      public static void main(String args[])
      {
         t t1=new t();      
      }
      
      
}

Bye Murali.R
0
 

Author Comment

by:snataraj
ID: 2640192
hi,
    Thanks a lot for your reply..im very new to this site(just joined) and thats why i unknowingly rejected your answer..its perfectly working and thanks a lot once again.

im really very sorry for the inconvenience

sankar  
0
 
LVL 2

Expert Comment

by:muraliram
ID: 2640290

Dear Sankar,

Its OK.I ahev tested the code. Thats why I have posted a comment like that. If it is working give me the points sankar.

Bye

Murali
0
 

Author Comment

by:snataraj
ID: 2640301
Thanks once again murali. Im really very new to this site and thats why all the mess has happened.

sankar
0
 

Author Comment

by:snataraj
ID: 2640322
dear murali,
             i wish i could give you 500 points, but im left with just 20 points...

regards
sankar
0
 
LVL 2

Expert Comment

by:muraliram
ID: 2640366
Dear Sankar,

       This will happen with almost every one who is new to this site. Its OK sankar. 50 points is too mch for this question.

Bye Sankar

Murali
0
 

Author Comment

by:snataraj
ID: 2640375
Dear murali,
             Does it mean that if i dont have any points, i cant ask a question ?


regards
sankar
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
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…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

707 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