swing
set maximum size of JPanel inside BorderLayout.CENTER
I have a JPanel inside BorderLayout.CENTER The JPanel has a Grid Layout, and I want it to expand with the CENTER for its width, but the height must stop at a maximum and use the preferredSize when po[详细]
2023-04-13 09:33 分类:问答Java Draw Line based on doubles (sub-pixel precision)
I am making a basic Java program and I would lik开发者_StackOverflow中文版e to draw a line using basic swing Graphics.drawLine.[详细]
2023-04-13 09:13 分类:问答Several input fields with JOptionPane?
I wonder if it\'s possible to have several input fields i the JOptionPane in Java, instead of one like in开发者_JAVA技巧 the code below?[详细]
2023-04-13 09:01 分类:问答The JPanel contentpane confusion
I am learning Java Swing and I appended a menuBar to the frame. By default this should call jframe.getContentPane().add(child). When I ran the script the menuBar didn\'t show up. But the button was at[详细]
2023-04-13 08:59 分类:问答Does Java have built-in "reversed" SwingWorker
SwingWorker lets you prepare some data in a background Thread and then use it in EDT. I am looking for a utility that does the opposite: Prepare data in EDT, and then pass it to a background Thread.[详细]
2023-04-13 08:31 分类:问答Parsing data back to mainPanel (java/swing)
Set up: I have a mainPanel with a tabbedPane on it, i have a separate JPanel \'extra\', extra creates an objects and i wish to pass that object back through to the mainPanel where i can actually use i[详细]
2023-04-13 08:13 分类:问答JTable, custom header renderer and sorting icons
While setting a custom renderer on a JTable header Iget the expected visual behavior (borders, font, alig开发者_StackOverflow中文版nment, ...) but I can\'t manage to get the LaF sorting icons that usu[详细]
2023-04-13 07:19 分类:问答Behavior of cells in Jtable (right click inside of a cell)
I have a JTable and I want to open a PopupMenu by a right-click inside a cell. I tried this by making my own AbstractCellEditor, but it doesn\'t work (When I start my program and when the first method[详细]
2023-04-13 07:11 分类:问答How format the output of decimal numbers via the JOptionPane
My assignment asks me to format values to two decimal places. We are asked to use the JOptionPane for input/output. I know how to format to two decimal places using the System.out.printf. However, I d[详细]
2023-04-13 07:07 分类:问答Closing a JOptionPane Causes a Deadlock in Java Swing
I have an application which开发者_开发知识库 runs OK at most sites.But one site, which is hosting the application on a Citrix Box appears to have a deadlock problem.I ran a profiler on the session and[详细]
2023-04-13 06:48 分类:问答