jgoodies

Clearing Last Selected Value JCombobox when ComboBoxModel Becomes Empty

﹥>﹥吖頭↗ 提交于 2020-01-06 17:01:13
问题 Here is a scenario: I have two JComboBoxes (call them combo1 and combo2 ) that get their values from a database [In the DB, these two have a 1:M relationship]. When the screen shows up I populate combo1 with values from the database and then take the first entry in the list and get its corresponding values to populate combo2. Since the values of combo2 depend on what is selected in combo1, every time the selection changes in combo1 a call is made to the database to get matching values to

How can I bind a property (e.g. an Enum) to a component property of a different type (e.g. an image for each Enum)?

ぃ、小莉子 提交于 2019-12-24 02:57:08
问题 I have inherited a project that uses JGoodies Binding to connect the domain model to the GUI. However, there are some inconsistencies that I have found which also cause some bugs. In this concrete case, the GUI is represented by two radio buttons and a label. Depending on which button is selected, the label should display a certain image. The buttons are bound to different Enum values, like this: AbstractValueModel enumSelectionModel = presentationModel.getModel("selection"); radioBtn1 =

Can a value from a JTextField be forced into the ValueModel (JGoodies)

半世苍凉 提交于 2019-12-22 17:38:20
问题 I have this code: this.trigger = new Trigger(); this.presentationModel = new PresentationModel(this.personBean, this.trigger); final ValueModel firstNameAdapter = presentationModel.getBufferedModel("firstName"); final JTextField firstNameTextField = BasicComponentFactory.createTextField(firstNameAdapter); and firstNameTextField.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { trigger.triggerCommit(); } }); So when I push the enter button on the

What happened to the JGoodies binding tutorial code?

不想你离开。 提交于 2019-12-22 05:18:17
问题 I want to learn how to use JGoodies binding (since beans binding seems dead in the water, and so does its fork). the JGoosides binding docs refer to the tutorial source code, but this code is not available in the latest (2.5) distribution. After looking though previous distribution versions is seems the tutorial code was dropped between 2.0.6 and 2.1.0 Am I to understand that the tutorial is outdated? if so, is there an up-to-date tutorial distribution somewhere that I just managed to miss?

Align Swing Components across Panels

…衆ロ難τιáo~ 提交于 2019-12-19 07:26:05
问题 We have a JPanel wich contains multiple JPanels wich contain JComponents (let's say JLabels and JTextboxes) Inside each of the internal JPanels we use JGoodies Layout in order to ensure proper alignement of all Labels. But of course we would like to have all the Labels aligned independently on which subpanel they are. How could we do that, without fixing the width of the column which contains the JLabels? We can't loose the JPanels since we have to have Borders around groups of Components 回答1

Regarding bulding gui and widgets in java [closed]

自古美人都是妖i 提交于 2019-12-13 07:15:52
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I am a complete beginner in java. Although i have studied a lot of literature on the language (well sort of), this is my first real project. I was basically planning to make a simple clock widget and later plan to build Gui s. Until now, i had learnt in swing. But then i found on this site that Swing is kinda

Get preferred size of multi-line flowlayout

独自空忆成欢 提交于 2019-12-12 10:38:26
问题 I can't figure out a way to resize some components in a swing GUI. Some custom labels are being added to a FlowLayout which doesn't behave how they should when resizing the dialog. The panel is being built using the jgoodies forms framework. If using this, where the FlowLayout is being added to xy(3, y) FormLayout layout = new FormLayout("r:d, 5px, f:d:g", // columns "p, p, 5px, p, 5px, p") // rows The FlowLayout expands and a scroll bar shows up If using FormLayout layout = new FormLayout("r

Swing desktop-development

自作多情 提交于 2019-12-12 07:37:13
问题 I have a very general question regarding java desktop-gui-applications. My Experience: In the last years i have developed a number of desktop-applications, some using Swing alone, some Spring-RCP (which was great, still i can't just bet on a framework that has not seen an update for over 3 years anymore). I am also watching Valkyrie RCP, but it seems to me that there is really not that much movement there either. I also developed web applications with Wicket, Tapestry and more recently with

Can a value from a JTextField be forced into the ValueModel (JGoodies)

筅森魡賤 提交于 2019-12-06 07:11:35
I have this code: this.trigger = new Trigger(); this.presentationModel = new PresentationModel(this.personBean, this.trigger); final ValueModel firstNameAdapter = presentationModel.getBufferedModel("firstName"); final JTextField firstNameTextField = BasicComponentFactory.createTextField(firstNameAdapter); and firstNameTextField.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { trigger.triggerCommit(); } }); So when I push the enter button on the JTextField , I expect the value in my ValueModel class to be the same as the value in my JTextField .

Essential Swing libraries? JGoodies, JFreeChart [closed]

梦想的初衷 提交于 2019-12-03 12:45:28
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 8 years ago . The wheel is invented over and over again - at least it seems so when looking at any average Swing GUI project. In many areas there