Skip to main content
Filter by
Sorted by
Tagged with
2 votes
1 answer
61 views

I have a simple JFrame with a JPanel inside a JScrollPane. The JPanel is used to show a vertical list of either JTextField or JEditorPane components: public class Test { void showFrame() { ...
BobColombo's user avatar
1 vote
2 answers
66 views

I'm assembling a JPanel consisting of multiple JTables. Each JTable has an enclosing JScrollPane so the header values are displayed. The entire JPanel has an enclosing JScrollPane. In this example, I ...
Gilbert Le Blanc's user avatar
1 vote
2 answers
94 views

I'm trying put a JPanel (GridLayout 0, 1) with JButtons it, within the ViewPort of a JScrollPane. This is easy enough to do, but it doesn't behave "properly" when resizing the parent JFrame....
George Minkov's user avatar
0 votes
2 answers
89 views

I've got a Java 8 app with a couple of JTextFields and a JButton to log into a database and a JTextArea inside a JScrollPane to display errors. Both the textarea and the scrollpane have to be hidden (...
Neph's user avatar
  • 2,013
0 votes
1 answer
110 views

The goal is to draw a bunch of circles (each a separate JComponent instance) onto a JPanel, and to be able to scroll far enough in any direction to see all of them. Here is the "main" code: ...
Dilara's user avatar
  • 1
0 votes
2 answers
136 views

It has been a while since I programmed with Java Swing, so I'm not an expert with all it's methods. Just to contextualize what I'm doing, I'm building an URCap UI that I'm using in a UR Cobot (That's ...
Searcher's user avatar
0 votes
1 answer
33 views

So I have created a JTextArea (in my case TextArea - to override append and setText methods that include line breaks), to visualise end user what is going on at what time. I have: limited space ...
Traqu's user avatar
  • 13
0 votes
1 answer
32 views

I am displaying an image in a scroll pane and it works great when the pane is smaller than the image. When the pane is larger then the image, the image is centered vertically and left justified ...
AlexHomeBrew's user avatar
0 votes
0 answers
34 views

I have a JPanel with a FlowLayout inside of a viewPort of a JScrollPane. I can add components dinamically to this JPanel but when I reach the end of the JScrollPane what i want is for the components ...
VAndrew009's user avatar
0 votes
0 answers
71 views

I found a few questions similar to the one I have, including this and this, but none that really answered the problem, and it's because I am using a JScrollPane. I found the code necessary for the ...
The Dog on the Log's user avatar
-2 votes
1 answer
66 views

Here's the code I have for my GUI public class gui extends JFrame{ JFrame mainF; JPanel listPanel; JTextArea jtArea; ButtonGroup buttons; ButtonGroup restoreButtons; JRadioButton createButton; ...
user avatar
0 votes
1 answer
74 views

I have a JFrame (frame) with a JScrollPane. The JScrollPane contains my ContainerJComponent (DebugPanel). This ContainerJComponent contains JComponentItems (DebugItem). This is an abstracted problem ...
hinrich.'s user avatar
0 votes
1 answer
69 views

I have an implementation where I want to reload data while scrolling a JList after scrolling every 100 records. I have a large database, and it takes around 7 seconds to load the JList. Therefore, a ...
slow_learner's user avatar
0 votes
0 answers
44 views

I have a code to load data when scroll is performed. Suppose I scroll, the loadData method is called and is in progress. If during this time I keep scrolling, even though the scrollbar is not moving ...
slow_learner's user avatar
0 votes
1 answer
424 views

I am creating an application that involves drawing a BufferedImage to a JComponent using Graphics2D in a paintComponent(Graphics) method. I added the ability to zoom in and out of the image. The ...
davidalayachew's user avatar
1 vote
0 answers
50 views

I noticed some interesting behavior with JScrollPane when manipulating the underlying document in a JTextPane. Consider this example: public class Example { public static void main(String[] args) ...
Cardinal System's user avatar
0 votes
1 answer
53 views

I have some issues making a JScrollPane scrolling in Swing. I don't know why it is doing that. It worked before when I just created a pane on top of the contentPane. But it is not working anymore now ...
Tristan Maisonneuve's user avatar
1 vote
0 answers
171 views

my goal is to implement an image viewer, where one can zoom to the mouse position and the JScrollPane correctly response to this zoom gesture. Also the possibility to roate the image would be nice. I'...
Displayname's user avatar
0 votes
0 answers
62 views

I've already created a working scrolling pane using JScrollPane, however, the current code works as follows: I type something into the chat input, press enter, it creates a JPanel and adds it to the ...
PokeCedGo's user avatar
0 votes
0 answers
21 views

so I am making a program to study and I want to see and edit the words that you upload in a Jscrollpane and I have a JPanel with gridlayout(0,2) in the Jscrollpane (with maximum height of 700) and ...
war030805's user avatar
1 vote
3 answers
134 views

I'd like to add a non-scrolling element, always visible element (a "pinned" element) in a JScrollPane of a Swing GUI. Taking this example code: public class Main { public static void ...
ix0rai's user avatar
  • 49
-1 votes
1 answer
135 views

So I have a program that utilizes JFrame and JPanel and such. I have multiple JPanels with JTextAreas within them, like a list. I'm trying to create JScrollPane that allows me to scroll through all ...
ThrillerGriller's user avatar
0 votes
0 answers
42 views

I have a JTable and want my user to drag&drop entries into that JTable. To make that as obvious as possible, I want to display a placeholder image like "Please drag stuff HERE using your ...
MrSnrub's user avatar
  • 1,265
0 votes
1 answer
45 views

My Java program has a JTable in a JScrollPane. For the table I set setAutoResizeMode(JTable.AUTO_RESIZE_OFF) and I adjust the column widths to match the data using resizeColumnWidth (shown in many ...
Rob's user avatar
  • 19
1 vote
0 answers
38 views

I'd like to create in Java Swing a file manager-alike interface, with icons spanning horizontally unless no more horizontal space is possible to allocate, and then going to a new line. This is my ...
Alessandro's user avatar
1 vote
1 answer
130 views

I'm trying to create a horizontal JList with seven items inside a JScrollPane and only three of those items need to be visible and the others accessible via a scrollbar. Here's an example of what I'm ...
Obaraten64's user avatar
0 votes
1 answer
50 views

I searched and found tons of questions here about my problem, but it seems I cannot implement correctly the solutions I found. I have a JScrollPane in which I put a custom JPanel. This custom JPanel ...
Stefano's user avatar
  • 13
0 votes
1 answer
59 views

I am trying to manipulate some blue rectangles within a confined, much larger red rectangle. I have this working along with a zoom-in and zoom-out function The problem is I would like to display ...
Newbie Guest's user avatar
0 votes
1 answer
230 views

(to note im new to programming so this may be a simple answer or my code is just written wrong) I have a larger program with a string that is constantly being appended and trimmed. Its written with ...
tau's user avatar
  • 1
-1 votes
1 answer
57 views

I'm building a table of imported values from a csv sheet. I have 95 rows and 26 columns. I want to display all of the "dataS" values in my JTable, but I'm only getting the first column. Is ...
samcoder's user avatar
0 votes
1 answer
153 views

I'm writing a desktop application. The environment is following: Java SE 10 Eclipse IDE Java Swing MigLayout The source-code, the important parts. textPane = new JTextPane(); textPane....
ucas's user avatar
  • 487
2 votes
1 answer
56 views

public void createSpringLayout(SpringLayout spring, JLabel label, JScrollPane scrollPane, JPanel buttonPanel) { spring.putConstraint(SpringLayout.NORTH, label, 10, SpringLayout.NORTH, this); ...
MineRickStar's user avatar
1 vote
2 answers
236 views

I am trying to make a text editor with a button that appears at the bottom right of the editor regardless if you scroll up or down and appears over the text area import javax.swing.*; import java.awt.*...
Different's user avatar
0 votes
1 answer
43 views

At this site I have found a good example how to apply JScrollPane for a matrix of JButtons. The code is here below provided. JFrame f = new JFrame(); f.setDefaultCloseOperation(JFrame....
newman's user avatar
  • 163
0 votes
1 answer
302 views

I am a newbie to swing. I have created a table from an array list of objects. I want to know how I can remove the access white space from bellow the table- that is adjust the size of the JScrollPane ...
Jesse's user avatar
  • 15
-1 votes
2 answers
46 views

this is the code I have so far public class WindowHelpGui extends JFrame{ JScrollPane scroll; //constructor public WindowHelpGui(){ //add window title super("Help&...
qtdumdum's user avatar
-2 votes
1 answer
50 views

I don't know where the problem is, when the sample code is run alone and from scratch, the scrollbars are displayed correctly, but when we try to add them to a task area in the middle of a prepared ...
Ddll's user avatar
  • 105
-1 votes
1 answer
57 views

I'm trying to make an array of buttons go inside of a JPanel. From there, I want the JPanel to be added to a JScrollPane so if there are more buttons that are needed, I will be able to scroll through ...
TylerBalaskovitz's user avatar
-1 votes
1 answer
103 views

I am trying to make a simple text editor using JTextArea, but when I type more text so that it goes off the screen, the JScrollPane is still not enabled and not letting me to scroll. I've looked for ...
Alpha's user avatar
  • 36
0 votes
1 answer
48 views

I'm trying to make a file view(JScrollPane) resizable for an ide, but when I try to resize it, It wont update unless I resize the window. I try looking it up but I could not find anything usefull. If ...
Crazy games's user avatar
-1 votes
2 answers
218 views

I have the following code: import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import javax....
Zero's user avatar
  • 94
0 votes
3 answers
119 views

Good afternoon! It is necessary to make a list (vertical) from lists of events (horizontal). There are at least 2 problems: the area of the list of events (horizontal scrolling) expands beyond the ...
IvanNaStackOF's user avatar
-1 votes
1 answer
71 views

I have a secondary JFrame for a settings panel, however, whenever it is opened or resized all elements inside it (a lot of textfields, sliders and so forth) go invisible. I can get the GUI elements ...
G. B. Wanscher's user avatar
0 votes
1 answer
279 views

I have a frame f, panel Fpanel. and textarea j. This is a part of my code. The scroll does not seem to be working on my text area. JTextArea j=new JTextArea(); j....
abc's user avatar
  • 59
0 votes
1 answer
203 views

i have a DefaultTableModel: DefaultTableModel model = new DefaultTableModel(data, beschriftung) { // Returning the Class of each column will allow different // ...
Thomas Hansmann's user avatar
0 votes
0 answers
45 views

I am making a chatbot using a Java GUI template and everything works fine it's just that I am unable to add a JScrollPane to a JPanel that was created in a customizer class. I want the panel to have a ...
M o's user avatar
  • 1
0 votes
0 answers
32 views

I have this JFrame that has a JScrollPane and a JTextArea inside it, it works okay but the scroll button only appears at the bottom, I want it to show at the top as default. How can I change this? ...
Lucas Almeida's user avatar
0 votes
1 answer
147 views

I have a text area that updates a button press (this updating works fine). When it updates, a long list appears in the text area that requires a scroll bar. However, when I add the last two lines ...
Nicole Ellsworth's user avatar
0 votes
2 answers
72 views

I am trying to add the content to the mainPanel and mainpanel to the mainScrollPane. However, an empty dialog is displayed. IMPORTANT: it must be implemented with JPanel and JScrollPane... `...
user avatar
0 votes
0 answers
108 views

I'm trying to create a form for a Task List, that will have a list of tasks sitting in a JScrollPane, with some buttons below it, to essentially look like this: The problem I'm running into is that ...
ChrisG29's user avatar
  • 1,571

1
2 3 4 5
55