Solved

How to disable frame resizing

Posted on 2000-03-21
10
453 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
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!

 
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

Suggested Solutions

Title # Comments Views Activity
Java exception bubble up 2 24
hibernate jars 4 59
Is Applet the way to go for my drag and drop system? 8 35
How to configure empty element in XML Document parser? 15 44
INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
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 will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This video teaches viewers about errors in exception handling.

733 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