• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 475
  • Last Modified:

How to disable frame resizing

How do i disable the resizing of an awt frame in java
0
snataraj
Asked:
snataraj
  • 5
  • 4
1 Solution
 
muraliramCommented:
Dear snataraj,

 Try teh following.

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

This will work.


Bye

Murali
0
 
yogeshrCommented:
use setResizable(false) method after the frame is initiliased.
0
 
muraliramCommented:
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
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

 
muraliramCommented:
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
 
snatarajAuthor Commented:
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
 
muraliramCommented:

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
 
snatarajAuthor Commented:
Thanks once again murali. Im really very new to this site and thats why all the mess has happened.

sankar
0
 
snatarajAuthor Commented:
dear murali,
             i wish i could give you 500 points, but im left with just 20 points...

regards
sankar
0
 
muraliramCommented:
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
 
snatarajAuthor Commented:
Dear murali,
             Does it mean that if i dont have any points, i cant ask a question ?


regards
sankar
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now