jpanel
What is the preferred layout manager for a container with collapsable JPanels
My code h开发者_如何学Pythonas a JPanel that contains three collapsible JPanels. The outer JPanel uses the BoxLayout to stack the three JPanels vertically. However, when I collapse a JPanel, the top J[详细]
2023-03-25 08:25 分类:问答Not able to add 3 JPanels to a main panel
I have 3 JPanels and I want to place them all in one JPanel. I used the GridBagLayout for the main panel. But only one panel is getting added. Why might this be?[详细]
2023-03-25 03:04 分类:问答Trying to add multiple panel objects to a different class that creates a basic JFrame
I am creating a class that acts as a container which holds a label and buttons.I want the buttons to only appear when I mouseover the label on a new layer, and be cl开发者_StackOverflow中文版ickable,[详细]
2023-03-25 02:23 分类:问答drawing strings on jpanel
I want to draw string on jpanel but I do not know the number of string I am going to pass the panel开发者_如何学C in some cases there are four string in some cases there are five string in some cases[详细]
2023-03-24 11:04 分类:问答Java - using paintComponent for graphics, calling functions from within?
I\'m really confused with the program flow for how the paintComponent function works within my JPanel. Ideally I\'d like to have access to the Graphics object to draw stuff from other functions based[详细]
2023-03-24 04:47 分类:问答How do I tell if the tab that I have open is the active tab in java?
I have a panel inside a jtabbed pane that I only want to refresh if the tab is visible. I tried, isShowing(), isDisplayable() and isVisible() and none of them seem to work as they check whether or not[详细]
2023-03-23 23:38 分类:问答Java setting dimensions of JPanel
I have created a JPanel within a JPanel, and I would like to set its width and height attribute to some specific numbers. here is what I have so far.[详细]
2023-03-23 23:19 分类:问答Problem updating JPanel in JDialog with JComboBox
I have created a JDialog which contains a JComboBox and a panel underneath which should display a different content based on the value selected in the JComboBox. I have created a JPanel (panel_1) whic[详细]
2023-03-23 19:36 分类:问答Dynamic JPanel addition
I am trying to create a dynamic Swing GUI. I need to add/delete JPanels when I click on add/delete button. I am not able to add JPanels dynamically. Initially JPanel loads but the array of JPanels fai[详细]
2023-03-23 11:28 分类:问答Alignment of components in a gui window
I have got a window that looks like window1 and I would like it to look like window2: This is my code:[详细]
2023-03-23 00:59 分类:问答