How do implement a listener in java so that when frame resizes, panel inside resizes with it?

Posted on 2012-09-20
Last Modified: 2012-09-20
How do implement a listener in java so that when frame resizes, panel inside resizes with it?

I have a jpanel that needs to resize to a certain portion depending on the size of the frame.

How can I acheive this?
Question by:mmedi005
    LVL 24

    Accepted Solution


    Take a look at these examples

    You would with this example use the componentResized event and resize all the objects that need to be resized.

    More frame examples here

        Tomas Helgi

    Author Closing Comment


    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    Suggested Solutions

    For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
    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 …
    This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
    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.

    734 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

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now