swingx

How can I create a border like this in Java?

梦想与她 提交于 2019-12-08 04:30:18
问题 I've been trying to replicate this border for hours without success: Any idea on how to do this? 回答1: This is Borders from SwingX (some older version), but I can't found this older repository right now by using this Image (cuold be colorized with un_belivable Colors and required another classes Painter and???) private static class RoundedBorder implements Border { private static BufferedImage img; static { try { img = ImageIO.read(RoundedBorder.class.getResource("resources/border.png")); }

Disabling dates in a JXDatePicker/JXMonthView

余生颓废 提交于 2019-12-06 06:37:28
A program I'm writing allows users to click a date on a JXDatePicker to set the date a task has been completed. I would like to disable the selection of future dates in the JXDatePicker, since in my program selecting future dates is invalid. I have found that JXDatePickers contain a JXMonthView, and it does not seem that date pickers or month views allow you to disable individual/ranges of dates. I can change the background coloring of individual dates and ranges of dates, which should allow me to make future dates a separate color. Then I could add in some validation whenever the user clicks

How to Add a JXDatepicker for a JTable column

夙愿已清 提交于 2019-12-05 12:49:28
I'm using a JTable. There I have a Date column, where I need to make a JXDatePicker appear when I click on a cell so that I can select a date from it. Can someone show me how to do this? Thanks! waiting for an answer.. You should probably use DatePickerCellEditor , which is a CellEditor using a JXDatePicker as editor component. For example: TableColumn dateColumn = table.getColumnModel().getColumn(columnIndex); dateColumn.setCellEditor(new DatePickerCellEditor()); Here is a demo table: import java.util.Date; import javax.swing.JFrame; import javax.swing.JScrollPane; import javax.swing.JTable;

Installing SwingX in Netbeans

自作多情 提交于 2019-12-04 15:03:36
I have problem installing SwingX in my Netbeans IDE. I want to play with JXPanel and related components but i could not get right library and get it going. I tried to download swingx.jar but there is no valid link available in internet. I somehow managed to download swingx-1.6.jar, swingx-beaninfo-0.9.7 and swingbean.jar. I imported these jar files into the new library i created "SwingX" using tools->library and after that went to tools->palette->Swing/AWT Components and added a new palette group called SwingX and added the created library (SwingX) into it. Now i get a block in my IDE as shown

how can i use JXMapViewer in my applet?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-04 13:52:31
i want to write an applet that must render my map images with zoom/pan tools, i find out JXMapViewer can help me, how i can use it? where i can find related docs which help me to write an applet that request on my image server to provide tiles to render? what about image server and .... !!!!??? help me on : image server structure, tileprovider, tilefactory,... that JXMapViewer need. As AeonFlux linked you, Joshua Marinacci's blog is the best resource to get started. There are six articles he wrote that I have used to get up to speed with JXMapViewer. In order of publication: Getting started

Best way to implement a selection box from a large number of entries

送分小仙女□ 提交于 2019-12-04 04:19:51
问题 I have a large set of data from which the user has to select one. I'm thinking of a way to implement it (of course, in a GUI). I have a few ideas. But just thought of posting here as there may be better alternatives.. Say, user has to select a name from a large set of user base. If I simply put a text field for user to enter the name, then there can be issues like entering same name in different formats, misspelling etc... I see two options here Using a combo box Using a list (Actually i'm

How do I invoke an immediate update to a Java GUI? (conflict with Thread.sleep())

痴心易碎 提交于 2019-12-04 03:23:45
问题 I am making the game Memory, when you pick two cards and if they match you get to keep them, otherwise you turn them back. If you then remember cards you have already chosen, you can venture a better guess on the next two cards. The problem I have involves the repaint() method not immediately repainting. When I flip the second card, no matter the outcome, I want to show both cards flipped right-side up before either discarding them or flipping them back over. I do this by calling sleep() . Of

How to change the color of particular cell in JXTreeTable dynamically

邮差的信 提交于 2019-12-04 02:17:53
问题 I am using JXTreeTable for making treetable structure now I want to change the color of specific cell dynamically. How can I change the color of cell? I found this code to change the color, but this is not working. Here is Code: leftTree.setDefaultRenderer(Object.class, new DefaultTableCellRenderer() { public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { Component c = super.getTableCellRendererComponent(table,

How can I create a “modern looking” Java desktop application?

我怕爱的太早我们不能终老 提交于 2019-12-03 01:30:46
问题 Similar questions to this are asked periodically, but many of these answers are outdated. I need to build a cross-platform desktop application in Java with a GUI of comparable quality to contemporary desktop apps. Swing is the default choice, but I have yet to encounter a Swing application that didn't look, at the very least, quite dated and clunky (subjective, I know, but with GUIs it's hard to avoid aesthetic judgements). I notice that the new Bitcoin client now uses QT with Java bindings,

How can I create a “modern looking” Java desktop application?

一世执手 提交于 2019-12-02 16:43:07
Similar questions to this are asked periodically, but many of these answers are outdated. I need to build a cross-platform desktop application in Java with a GUI of comparable quality to contemporary desktop apps. Swing is the default choice, but I have yet to encounter a Swing application that didn't look, at the very least, quite dated and clunky (subjective, I know, but with GUIs it's hard to avoid aesthetic judgements). I notice that the new Bitcoin client now uses QT with Java bindings, and does have an attractive user interface, but this has the disadvantage that it is no-longer pure