gui

How to set a backgroud color of a JButton in Java?

I am developing a Java Desktop Application. In it I have 4 JButtons on a JPanel. Now I want that whenever a button is clicked its background color changes to some other color (say orange) to represent that it has been clicked and the background color of all other 3 buttons reset to their default color (in case any of them had Orange back...

How to convert a JButton into JToggleButton in Java?

I have created hundreds of JButton using Netbeans in my Java Desktop App. Now I want to replace all of them with JToggleButtons. Can I do that by selecting all the buttons in the "Inspector" window of Netbeans and perform some task? Is there any short-cut method? It will take a lot of time to manually replace all of them. ...

Manually drawing gradients for buttons, toolbars, tabs etc?

I would like to update some toolbar-like code we have to have a Vista/Win7 gradient roundedness to them. Currently, the buttons have the Windows 2000 look & feel: blocky, single-tone. I've played around with the XP themes, and using DrawThemeBackground, DrawThemeEdge, etc.; but I'm very dissatisfied with the theme drawing mechanics (th...

Can't find a decent git gui for windows. Anyone know of one?

I'm running win7 and need a good git client with a GUI. I like bash but it feels clunky in windows. the GUI that comes with the windows package at git's website is missing a lot of stuff too. I'm considering switching to Ubuntu and using Gedit + git instead. What should I do? stay in windows and use Aptana or Komodo with another git clie...

Algorithm to layout rectangle windows in 2D display

I'm seeking for an algorithm to layout rectangle windows, the requirements are like below: All windows to be layout can be seen as small rectangles. All windows must be layout in a rectangle 2D display, and the display width and height is given. There are several dozen windows to be layout. Each window has an initial position (x,y) and...

On which occasions exactly is WM_ACTIVATE sent?

I'm trying to debug a huge Win32 GUI application (I have full sources) divided into several processes. The problem is the following: in one process I have a dialog with a listbox, when I double-click an item in the listbox another process is started that creates its own window that is brought to front and covers the initial dialog. If I ...

How to load already instantiated JComboBox with data in Java?

I have a Swings GUI which contains a JComboBox and I want to load data into it from the database. I have retrieved the data from the database in a String Array. Now how can I populate this String array into the JComboBox EDITED==================================================================== In actual, the JComboBox is already inst...

MFC dialog buttons show up as black boxes

I have an old MFC utility written with VS2008 project. We have used this utility for a few years now and I have never experienced this problem personalty but it is showing up more and more often on customers computers. Sub dialogs launched from my main dialog will have their buttons blackened out. I have included a screenshot from one ...

Update UI from multiple worker threads (.NET)

I have a pet project that I'm working on that has multiple worker threads. Outputting everything to the console is getting hard to follow, so I want to develop a UI that will have one output area per thread. I want to know the best way for the threads to send updates to the UI. I have two ideas: 1) Have each thread set a "DataUpdated" f...

A WireIt like GUI library for Netbeans/Swing

I am looking for an open-source java library for creating yahoo-pipes like GUI. Wireit is based on javascript. Prefer LGPL/Apache License that can be used for commercial purposes. ...

Where to find User Interface (UI) design patterns for Windows applications?

I don't know if this question really suits here, but we'll see :) For web applications there are sites like Pattern Tap and UI-patterns, which have a great collection of design patterns used in UI's. I can't seem to find any websites/books/articles which cover design patterns for Windows Applications. The only useful resource I found ...

Things app tasks. How?

Guys, any thoughts how create interface elements as tasks in Things application ? is it Nstableview? ...

Winform application layout - dealing with different DPI practices

We have a winform MDI application, there's quite a lot of forms/dialogs. Some are laid out with absolute location and sizes, some are laid out using table/flow panels. Overall appearance looked good under different screen resolutions. Until someone tested it on a machine where the DPI was set to 120. While mostly things looked good, som...

How to update JTextArea in Java Swing?

I have a JComboBox named "jComboBox18" and a JTextArea "jTextArea11". Now I want that whenever a item is selected from the "jComboBox18" combo box its corresponding description is shown in the "jTextArea11" textarea. I have added the appropriate listener to the JComboBox But the JTextArea is not showing any text. The code that I have wr...

How to display tree hierarchy in Java?

I have a table in a database named "Process" This process table has 3 fields: process_id process_name process_parent_id Now I want to display this parent child hierarchy in Graphical format. So could you please suggest me the following: Q1. Which data structure would be better to use so as to get data from the database and store in...

Is Perl a good option for writing platform independent desktop applications?

Is Perl a good option for writing (possibly and partially) platform independent desktop applications? I know there are interesting widget libraries like GTK2 Perl and wxWidgets but I'm not familiar with development on Windows. Is it possible to write a good application with Perl and those tools, maybe embedding everything needed to avoi...

jpl:communicating prolog from java

I'm implementing a software by jpl provided by swi-prolog for calling prolog from java. I'm using Eclipse as IDE. I don't know how to start this example very useful for my purposes that I found on line with other prolog files. Here the java code: package prolog; import java.awt.Container; import java.awt.FlowLayout; import java.awt.ev...

.NET Compact Framework: how to ensure form is visible before running code?

We've got a Model-View-Presenter setup with our .NET Compact Framework app. A standard CF Form is implementing the view interface, and passed into the constructor of the presenter. the presenter tells the form to show itself by calling view.Run(); the view then does a Show() on itself, and the presenter takes over again, loading up data ...

What are good options to create a simple standalone desktop GUI (requirements included!)

Here are my requirements for a very very simple desktop gui I need to make. Totally standalone - Needs to be double clickable with out the reliance on having anything installed on the users machine. Simple GUI - Bare bones. Will be loading a list from a file that will be stored in a dropdown or w/e. Rock solid on Windows distributi...

How do you modify the appearance of a disabled button in vb.net?

I'm disabling a button in vb.net and when I do, I cannot control the BackColor or ForeColor properties to change the appearance. I set new values for them but they don't get picked up. The disabled button looks almost exactly like my enabled buttons so you can't tell the difference. I'm using Flat Style buttons, but have tried changin...