Resize « JScrollPane « Java Swing Q&A





1. Resize JScrollPane client without scrollbars rolling    stackoverflow.com

I have a JScrollpane which contains a scrollable client that changes its size dynamically while using the application. I want the JScrollPane to be aware of the changes without moving the ...

2. JScrollpane scrollbar resizing problem    stackoverflow.com

I have the following problem: I have JScrollPane containing an image. The scrollpane is inside a JPanel together with other components in order to be able to layout the whole thing with ...

3. How to rotate an image properly in JPanel (Java)    stackoverflow.com

I'm working on rotating a loaded image. I set the graphics on a JPanel and then use standard AffineTransform in order to rotate it, say, 45 degrees. Unfortunately, the image is ...

4. resize child panel when resizing parent JFrame    stackoverflow.com

I have a JFrame which contains a JPanel. The frame can be resized by the user using the mouse. When the width of the frame is > 400, the jpanel inside's ...

5. JScrollPane: How to resize automatically the JPanel contained in the scroll    stackoverflow.com

I'm working on a little applet that has a list of items in a JScrollPane on the left. the user will be able to add and remove elements from this list. therefore I ...

6. JScrollPane not resizing when added to JPanel    stackoverflow.com

I cant get the scrollPane to resize correctly when added to the scrollPanel. I want the scrollPane to scale to the size of the scrollPanel. Any tips?

public class MTabbedPane_HomePanel extends JPanel ...

7. Resizing JPanel enclosed in a JScrollPane    forums.netbeans.org

Hi guys. I will begin a new by next month, and as I will be using netBeans for GUIs development, I have been practicing for a while. Now I'm facing a problem that doesn't arise when coding by hand. In a JDialog I have a JScrollPane as main component. Within the scrollpane I have put a JPanel with 24 Text area ...

8. Need Help resizing my JScrollPane    coderanch.com

import java.awt.*; import java.awt.event.*; import javax.swing.*; public class ScrollPaneTest implements ActionListener { JTextArea textArea; public void actionPerformed(ActionEvent e) { JButton button = (JButton)e.getSource(); String ac = button.getActionCommand(); int columns = textArea.getColumns(); if(ac.equals("less")) columns--; if(ac.equals("more")) columns++; if(columns >= 0) { textArea.append("columns = " + columns + "\n"); textArea.setColumns(columns); textArea.setCaretPosition(textArea.getDocument().getLength()); textArea.revalidate(); } } public static void main(String[] args) { ScrollPaneTest test = new ...

9. How to Resize JScrollPane used in a JPanel?    coderanch.com

you'll need to experiment with different layout managers e.g. run this, and it should display what I think you are describing, then swap the new JPanel() lines, recompile and rerun import javax.swing.*; import java.awt.*; class Testing { public void buildGUI() { JFrame f = new JFrame(); //JPanel p = new JPanel(new BorderLayout());//<---swap this line JPanel p = new JPanel();//<---for this line ...





10. Heavyweight Component resizing inside JScrollpane    java-forums.org

Hi, in my application i have a heavyweight component (jpanel with a few buttons, jtextfields, jtextareas, etc) that i put in a scrollpane. the scrollpane is supposed to only scroll vertically - in the horizontal direction, i want to resize the components in the scrollpane to the appropriate size depending on the main frame of the application. when the application starts, ...

11. Resize JPanel in JScrollBar    java-forums.org

Resize JPanel in JScrollBar Hello, I am work on creating a survey using swing. I have a working model however there is one problem which I cannot solve. I have included a JPanel in a JScrollPane. The JScroll pain is the main container for my entire survey. The problem I have is that if the JScroll pain is stretched ...

12. scrollpane does not resize based on the container    java-forums.org

I have a Panel which contains two panel. The bottom panel has a scrollpane with a table. When I resize the top panel, the bottom panel resizes but the scrollpane remains the same. How can the scrollpane be increased based on the panel increase. I tried changing the size of the scrollpane and revalidate but it did not change. Thanks for ...

13. JScrollpane auto resize    java-forums.org

14. Can't resize a JScrollPane    forums.oracle.com

Hi All, I seem to be stuck doing what I'd regard as a simple task I have a JFrame with absolute Layout, on that I have a JScrollPane, inside that I have a larger JPanel. All displays fine, just how I want, when I resize the Jframe, can't get the JScrollPane to resize accordingly using the ComponentResized event... private void formComponentResized(java.awt.event.ComponentEvent ...