?
Solved

Maximize window ---> TextEdit take new window size

Posted on 1998-02-12
1
Medium Priority
?
220 Views
Last Modified: 2006-11-17
HI,

I am developping a text editor with IBM VA for Java. I am new to this environment. When I maximize the window (a frame), I want the textedit control it to take all the new space automatically. How can I do that?
0
Comment
Question by:pjroy
[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
1 Comment
 
LVL 2

Accepted Solution

by:
shogi earned 200 total points
ID: 1233035
Nothing exist in the the basic set of Java.  So what you have to program the componentResized event and program the new space of you textedit or any others controls.

class SymComponent extends java.awt.event.ComponentAdapter
{
public void componentResized(java.awt.event.ComponentEvent event)
{
  Object object = event.getSource();
  if (object == Frame1.this)
     Frame1_ComponentResized(event);
}
}

void Frame1_ComponentResized(java.awt.event.ComponentEvent event)
{
  // example write in a label the size of the Frame.
label1.setText("The size of the Frame is   " +                  (event.getComponent()).getSize());
}

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 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 …
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses
Course of the Month10 days, 4 hours left to enroll

762 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