Questions tagged [jsplitpane]

1

votes
0

answer
63

Views

JSplitPane in JLayeredPane

I want the right content of an JSplitPane to fill the entire available space and the left content (panel) to be on top of the other panel. I was thinking about using a JLayeredPane to solve that problem but I couldn't get it to work. My class currently looks like this: public class LayeredPane exte...
Ubuntix
1

votes
1

answer
4.4k

Views

jsplitpane in netbeans

I am trying to use a JSplitPane in Netbeans 6.9.1, but I can not configure it properly for some reason. E.g. I add a jtree and a jtable in a jframe. Then I use 'enclose in splitpane'. Then I set the orientation to vertical (from horizontal). Problem, when I try to adjust the divider location, I can...
Cratylus
1

votes
1

answer
584

Views

Why does JSplitPane mash my GridBagLayout?

I don't really have example code for this (so I'll try to explain it), but I'm wondering if there is a way to stop JSplitPane from mashing my layouts? I have two panels that I add into a JSplitpane which both have GridBagLayout on them. On the left pane I have a table. On the right pane I have a JP...
WilliamShatner
1

votes
1

answer
116

Views

JSplitPane slide only to one side

Im not sure why, but the slider only goes to the left and even locks the new position. It uses a modificated version of the NestedJSplitPane tutorial with JTree and JEditorPane. My guess is, that the JEditorPane causes the problem... public frameMenu(){ JEditorPane htmlPane; JTree parkSelect; JTree...
Füchschen
1

votes
1

answer
799

Views

JScrollPane not showing the scroll bars inside a JSplitPane

I have this piece of code that is basically a JFrame that contains a JSplitPane which contains on the left side a JScrollPane which contains a JPanel. I expected to see the scroll bars since the JPanel inside the JScrollPane is larger that the JScrollPane itself. Why are the scroll bars not displaye...
corneliu
1

votes
1

answer
50

Views

Mouse cursor won't change when rolling over objects

I'm having an issue with a GUI I built. I'm trying to set different cursor changes when rolling over certain objects- i.e., hand cursor when hovering over buttons and text cursor when hovering over textfields. However, the appropriate code doesn't work. I've tried both the following codes: classArmB...
Ryan Cohan
1

votes
2

answer
280

Views

Why split pane divider does not move when two panels are added in it?

I have written a simple program. I use a JSplitPane in center of JFrame and I want to show two picture in it's two sides so I use two JLabel components and I put them in a JPanel. but divder does not move when I run the code. public class A extends JFrame { private static final long serialVersionUID...
Hosseinmp76
1

votes
1

answer
31

Views

JTable doesnt show

First I have created JSplitPane: JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT ,new JScrollPane(textArea), new JScrollPane(table)); add(splitPane);//added to frame then I have created table with default model: DefaultTableModel model = new DefaultTableModel(columns, 0); JTable tabl...
i_rezic
1

votes
3

answer
0

Views

Getting java.lang.ClassCastException: javax.swing.KeyStroke when creating a JSplitPane

I'm getting a random unreproducible Error when initializing a JSplitPane in with JDK 1.5.0_08. Note that this does not occur every time, but about 80% of the time: Exception in thread 'AWT-EventQueue-0' java.lang.ClassCastException: javax.swing.KeyStroke at java.util.TreeMap.compare(TreeMap.java:109...
Epaga
1

votes
1

answer
0

Views

How to implement JSplitPane in the BorderLayout?

HI, how can i use the JSplitPane so that they show up in the borders of a BorderLayout??? So that i can resize each sise (NORTH, EAST, WEST, SOUTH, CENTER). Thanks
Pedro Luz
1

votes
2

answer
0

Views

Make JSplitPane fully transparent

I am writing GUI program in Java. I have a JPanel called jpanel1 that I inserted a JSplitpane (jSplitPane1) on it. I set right and left components of jSplitPane1; jpanel2 & jpanel3. I set a background image on downward panel (jpanel1) and I want to JSplitPane and it's right and left components be t...
sajad
1

votes
1

answer
0

Views

JSplitPane does not display items

I am writing a tool take performs a task on text file. The task takes some time to perform so I made a panel that displays the file name and the progress in percentage. The user may run the task on one or on several files, so I need to display a panel for each file. With help I got here I have this...
Yoav
1

votes
1

answer
0

Views

Java: custom cursor for Jscrollpane or Jsplitpane?

any way to set custom cursor from image for a jscrollpane in a jsplitpane panel? right now I get a custom icon that displays in the entire Jframe and I would like it limited to a specific jscrollpane. anyway to make it display on top of heavyweight component?
KJW
1

votes
1

answer
2k

Views

JSplitPane with 2 JPanels, get size of JPanel after moving the divider

Status: I want to display 2 JPanels which contain images using a JSplitPane (one image at the top, one image at the bottom) When I move the divider of the pane, I want both panels to resize accordingly. (that the images take up the maximum possible space) The Problem: I'm using a PropertyChangeListe...
Simbi
1

votes
1

answer
708

Views

JSplitPane overlaps JButtons in BorderLayout, but does not when layout is null

So I'm having another issue..... I'm currently using a BorderLayout in my GUI so that when I resize my jframe, all of the internal components resize with it. I couldn't get any other layout to work with how I want the GUI to look while providing this resizing capability. At the top I have a JMenuBar...
thaweatherman
1

votes
1

answer
2k

Views

adding jpanels over split pane in java

I am trying to add three panels on a single JFrame form. if i am only adding three panels they are being displayed but if i add the panel on split pane nothing is being displayed suggest the error in following code import javax.swing.*; import java.awt.*; class paneltest extends JFrame{ paneltest()...
Adesh singh
1

votes
1

answer
247

Views

jfreechart each plot in JSplitPane

Has anyone implemented a CombinedXYPlot type of plot with each plot in a JSplitPane rather than all plots in one JPanel? This way one of the size dimensions of each plot could be modified without affecting the other plots (eg the CombinedXYPlotDemo4 if each plot was in a splitpane the vertical heig...
Don Smythe
1

votes
2

answer
546

Views

How to choose what JPanel in a split pane is resized when the entire app. is resized?

So I am programming an application using Java Swing, and I am wondering how to make it so that when the entire application gets resized only certain panels get resized in various ways. Take a look at the two pictures below: I have three vertical panels as you can see. Now when the application's heig...
1

votes
1

answer
316

Views

How can I keep the vlcj player from taking up all the room?

I am writing a small Swing program which involves embedding a video player in the interface. In order to achieve this, I am using vlcj. While the GUI itself has some more components, here is an analog code structure: import uk.co.caprica.vlcj.component.EmbeddedMediaPlayerComponent; import javax.swin...
John WH Smith
1

votes
1

answer
270

Views

Restrict JSplitPane divider movement

I am looking for a way to restrict divider movement beyond a certain width on Left Hand side. For example, I can use setDividerLocation(400) and then add another property with width = 500, so that user of the Swing GUI can move the divider till only width = 500. I was looking at setLastDividerLocati...
Kapil Sharma
1

votes
2

answer
33

Views

JSplitPane isn't shown

I have a problem with JSplitPane, I set the components to the JSplitPane but nothing is displayed. Here's the code: /**__COMPONENT OBJECTS__**/ JFrame frame = new JFrame(); JPanel leftPane = new JPanel(); JPanel rightPane = new JPanel(); JTextArea textArea = new JTextArea(); JButton button = new J...
Newokmyne
1

votes
2

answer
116

Views

JSplitPane setOneTouchExpandable(true) is not shown

I'm using nested JSplitPane... I want to use OneTouchExpandable, but running the code is not shown... But in preview mode I can see it. Here complete code: import javax.swing.JPanel; import javax.swing.JFrame; import javax.swing.JSplitPane; import javax.swing.JLabel; import javax.swing.JButton; impo...
QA_Col
1

votes
2

answer
30

Views

JLabel in front of JSplitPane

My goal is to have a window with 2 panels in different colors in the background. They each cover a specific percentage of the screen and this changes periodically. I did this by creating a JSplitPane. But now I want to add a JLabel showing some data in front of all of this in the middle of the scree...
TheInovat
1

votes
3

answer
5.7k

Views

How to set BackGround color to a divider in JSplitPane

I have created a divider in JSplitPane. I am unable to set the color of divider. I want to set the color of divider. Please help me how to set color of that divider. import javax.swing.*; import java.awt.*; import java.awt.event.*; public class SplitPaneDemo { JFrame frame; JPanel left, right; JSpli...
Sunil Kumar Sahoo
1

votes
1

answer
2.2k

Views

java: Problem with JSplitpane

I would like to have a jsplitPane and swap right component by left component while running my program. I set division location about 0.2. when I swapped my left component and right component and set division location about 0.8; there is a problem with jSplitPane. It is locked and I can't move diviso...
sajad
1

votes
1

answer
1.8k

Views

How to set a custom divider to a JSplitPane

I have found this example : http://java2s.com/Open-Source/Java-Document-2/Swing/petersoft-java-style-2/com/petersoft/white/SplitPaneDivider.java.htm And I would like to apply it to my JSplitPane. So I do : BasicSplitPaneUI bspUI=(BasicSplitPaneUI)mainContainer.getUI(); mainContainer.setUI(new ola.el...
Vincent Roye
1

votes
1

answer
1.1k

Views

No Scrollbar - JScrollPane with JPanel

I have a JSplitPane with JSplitPane jSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, movieSearchResultTableScrollPane, movieSearchInfoScrollPane); I have set: jSplitPane.setOneTouchExpandable(true); The movieSearchResultTableScrollPane has a JTable and if drag the splitpane to the left, a h...
Tapas Bose
1

votes
1

answer
625

Views

JSplitPane only moving one direction

I have a nested JSplitPane and the bottom split pane will only move to the left. It won't move to the right of the position even if/after I've moved it to the left. dataEntry=new JTabbedPane(); formformat=new JPanel(); dataEntry.addTab('Table Entry', tableScroll); dataEntry.setMnemonicAt(0, KeyEvent...
depperm
2

votes
1

answer
1.5k

Views

JSplitPane + MiGLayout: how to enable autoresizing

I'm doing something wrong here: I want to have two JButtons in a JSplitPane in a JPanel in a a JFrame, where the buttons fill the JSplitPane. Here's what I get when I resize the JFrame: The buttons stay their normal size, and the JSplitPane doesn't allow adjusting.something How do I fix this? impor...
Jason S
3

votes
2

answer
161

Views

How to create an interface which shows the objects in left side and detail for each object in the right side?

I'm not sure which container or component can help to create the following menu bar. I already created the menu bar and status bar at the bottom. But I have no idea which interface is the best. I apprecite any help,
Bernard
5

votes
1

answer
119

Views

How do I let a JSplitPane move smooth?

I have a simple Java Swing GUI with a JSplitPane to divide two JPanels. Now I wonder how I let it move smooth, so you can see it moving when resizing the window. The standard setting is very ugly, because the JSplitPane only moves if you release it. I spend a lot of time searching for something like...
Norukh
6

votes
7

answer
14.3k

Views

How to set JSplitPane-Divider collapse/expand State?

I have a JFrame with a JSplitPane that is OneTouchExpandable. I want to remember the last Divider position of the JSplitPane on JFrame dispose and restore the Position if the JFrame is reopened. It works well, but if the User expand one Side via the oneTouchExpandable UI-Widget then I store only t...
oliholz
2

votes
1

answer
186

Views

Disable JSplitPane divider listener temporarily

I have a simple JSplitPane which has listener on resize and listener on movement of divider. I need to set the divider location in resize listener without the divider listener printing out 'foo', but this code with boolean listenerdoesn't seem to solve the problem. addComponentListener(new Component...
Glissinda
2

votes
1

answer
939

Views

Java: Issue with jsplitpane and boxlayout

I want to get rid of the empty space to the left of the jsplitpanes: Here's my code: getContentPane().setLayout(new BoxLayout(getContentPane(), BoxLayout.Y_AXIS)); JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT); splitPane.add(downloadsPanel); splitPane.add(filesPanel); JSplitPane s...
opike
6

votes
3

answer
7.4k

Views

How to get the dimensions of the visible part of the JScrollPane-based window

This JScrollPane based window is a top part of the JSplitPane. getBounds(), getWidth(), getHeight() all return the full size of the window, including the invisible (scrollable) part. I want to know the dimensions of the visible part only.
Flot2011
2

votes
1

answer
2.1k

Views

How do you do Swing's JSplitPane in SWT?

I am looking for an SWT widget that would have the look and behavior similar to Swing's JPlitPane. Is there such a widget in SWT, and if not, what's the closest to it? (A pane split to two with the ability to move the border between the two parts)
inor
2

votes
2

answer
285

Views

Swing behavior on splitPane

JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, scrollPane , scrollPane2); I want to do very trivial action and I it doesn't work. Whenever I add label to either of scrollPanes - they simply don't display anything. I can display tables within panes but these are added through the...
Aubergine
2

votes
1

answer
232

Views

Is there a way to use setDividerLocation on the bottom componet?

I have a JSplitPane with a vertical split. The top component is a table which is in a JScrollPane, and the bottom component is a detailed description of a row. The bottom component always have the same number of elements, so essentially it stays the same height. Right now, I am using setDividerLocat...
samwell
11

votes
4

answer
23.5k

Views

Setting divider location on a JSplitPane doesn't work

I'm trying to set the divider location of a JSplitPane but it seems not to work. Here's an SSCCE: import java.awt.Color; import javax.swing.BoxLayout; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JSplitPane; public class JSplitProblem extends JFrame { public JSplitProble...
Heisenbug
2

votes
2

answer
8.7k

Views

Adjusting size of JPanels in JSplitPane

Trying to create a JSplitPane with two JPanels. With the following code: JTable table = new JTable(qualifierModel); table.setDefaultEditor(String.class, new QualifierCellEditor()); JPanel qualiferPanel = new JPanel(); JScrollPane jp = new JScrollPane(table); qualiferPanel.add(new JLabel(Translator.g...
Arun

View additional questions