All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.invation.code.toval.test.JScrollRevalidateView Maven / Gradle / Ivy

Go to download

TOVAL comprises a set of java classes for common programming issues. It includes utils for arrays, lists, sets and collections for convenient handling and modification, but also support for mathematic definitions concerning logic (clauses + resolution) together with some algorithms for permutations, powersets and resolution. Additionally it contains a number of types for multisets, matrices with object keys and much more.

The newest version!
package de.invation.code.toval.test;

import java.awt.Dimension;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
 
public class JScrollRevalidateView {
    private JPanel panel;
    
    private void start() {
        JFrame frame = new JFrame();
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setBounds(50, 50, 100, 100);
        frame.getContentPane().add(new JScrollPane(panel = new JPanel()));
        frame.setVisible(true);
        new Thread(new Runnable() {
            public void run() {
                try {
                    Thread.sleep(2000);
                    panel.setPreferredSize(new Dimension(500, 500));
                    panel.revalidate();
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        }).start();
    }
    
    public static void main(String[] args) {
        new JScrollRevalidateView().start();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy