JScrollPane « Layout « Java Swing Q&A





1. How do you implement position-sensitive zooming inside a JScrollPane?    stackoverflow.com

I am trying to implement position-sensitive zooming inside a JScrollPane. The JScrollPane contains a component with a customized 'paint' that will draw itself inside whatever space it is allocated - so ...

2. Swing: Positioning a popup from within a JScrollPane    stackoverflow.com

I have a JTable inside of a JScrollPane. I am creating a custom cell editor for one of the columns of the table, and I want this editor to pop up ...

3. JScrollPane layout    stackoverflow.com

I want to add table2 into the scrollpanel (called feedback) which already has table1 in there. But only one table shows up. If I use feedback.add(table2), only the 1st table shows ...

4. add a scrollable jpanel to a gridlayout    stackoverflow.com

I'm building a grid filled with labels. One of them contains html-text and should resize to maximum format and be scrollable. I found how to add a JScrollPane but it stays ...

5. The gridBagLayout and the JscrollPanel    stackoverflow.com

Cross Post: http://www.javaworld.com/community/node/4746 http://forums.sun.com/thread.jspa?messageID=11025554

1. GridBagLayout

When I tried to use the GridBagLayout, I found that I can not change the weight of each component added in the container. For example,In the ...

6. Java: JScrollPane doesn't work with GridBagLayout    stackoverflow.com

In my Java application, I'm writing a component that is used to view PDF files. I had a pretty slick implementation where the user could click on the PDF and ...

7. JScrollPane problem high position    stackoverflow.com

I have a problem with a JScrollPane that I can not switch to high position, I tried everything:

setValue(0);
setCaretPosition(0);
getViewport().setViewPosition(new Point(0,0));
Finally all ... One thing only works for putting up is the use of ...

8. JScrollPane problem    stackoverflow.com

I have made a program with a scroll pane, but it is not working. Please look at the source code: JInfoView.java

package view;
import javax.swing.*;
import java.util.*;
import java.awt.*;
public class JInfoView extends JPanel {
   ...

9. Incorrect GridBagLayout behaviour    stackoverflow.com

When I resize JFrame, the table (or more specifically the scrollPane) squishes into a little rectangle (with remains the same, but height is more like 5-10 pixels). Also I noticed that there's ...





10. jscrollpane - get a current position X    stackoverflow.com

I am trying to get a value for how much a user scrolls (for horizontal bar) by using jScrollPane. so I am using this function to get the value.

var api = ...

11. GridBagLayout and JScrollPane    coderanch.com

12. GridBagLayout/JScrollPane Bug Explained- Is there a workaround?    coderanch.com

Ever seen a jumpy GridBagLayout? Ever wonder why? This demo code explains it, and tracks root cause. The code to reproduce is self-explainitory. The first class is the one that demos the problem. The second is a utility class I use in the first, and is not relevant to the problem. import java.awt.BorderLayout; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.Insets; import javax.swing.JPanel; ...

13. problem positioning a JPanel in a JScrollPane    java-forums.org

Hello, I'm wondering if anyone's ever encountered the following problem: I have a JFrame that contains a JScrollPane that contains a JPanel in its viewport. The JScrollPane doesn't seem to want me to set the location of the JPanel to anything beyond -603. That is, for example, if I do this: MyPanel.setLocation(-800,-800); It will reset its location to (-603,-603). This happens ...

14. Changing JScrollPane default viewing position    java-forums.org

import javax.swing.*; import java.awt.*; public class ProjectileAnimationJPanel extends JPanel{ //variables float meter, xPositionMeter, yPositionMeter, zoom, previousElevation,yPosition; int elevationTimesMeter, previousElevationTimesMeter, counter, loopCounter, width, height; //variables for drawing image int groundHeight, sideOfElevation, eightthOfHeight, ballDiameter, ballRadius; //class object //constructor public ProjectileAnimationJPanel(){ this.setPreferredSize(new Dimension(800,600)); } //paint method public void paintComponent(Graphics g){ Graphics2D g2 = (Graphics2D)g; super.paintComponent(g2); this.setBackground(Color.BLUE); meter = 3; zoom = 1; //setting for ...

15. JScrollPane and GridBagLayout combination    java-forums.org

Hi, I'm developing a planner-like application, and on the road to make it comply with the requirements given, I've been stuck on a problem for a while. I need to make a UI that has the weekdays on top, the hours to the left and columns under each day in the middle. I need to be able to insert events into ...

16. Help with JScrollPane - fix viewport position    forums.oracle.com

I'm using a JTextArea on a JScrollPane to display status information regarding actions taken on a GUI. The idea is to put the latest status info - action suceeded, error performing action etc - at the head of the JTextArea using insert(). e.g. StatusNotify.insert("Connection Successful.\n", 0); I want a vertical scroll bar to appear so users can scroll down through prevous ...





17. gridlayout in a jscrollpane    forums.oracle.com

Hi, I have JPanel inside a JScrollPane: JPanel chartsPanel = ... JScrollPane scrollPane = new JScrollPane(chartsPanel... and a GridLayout on the chartsPanel: chartsPanel.setLayout(new GridLayout...) You can scroll vertically on the scrollPane, but not the horizontalPane. I want to display charts inside the chartsPanel such that the user can select the number of rows and charts to see without having to scroll ...

18. Using JScrollPane with custom layout managers    forums.oracle.com

Hi, I am in the process of writing a custom swing layout manager for a app, and since implementing this layout manager the scrollpane I was using seems to have vanished into thin air. I cannot work out whether this is because of the new layout manager or something else. Can anyone advise whether there is something I have to do ...

19. jscrollpane positioning question    forums.oracle.com

ok, well i've been searching the forums for a while now but i can find anything that solves the program i've run into. i've created a jscrollpane that contains a webbrowser (from jdic) and i was wondering how could i set the scroll bars (both horizontal and vertical) to a specific part of the website im displaying.