Forum

Posts

RECENTLY INDEXED PROGRAMMING SOLUTIONS OF Swing / AWT / SWT


Drawing a line on an inner JPanel  

I have a JPanel that sits on top of another Continue Reading
Views : 48
Tuesday 23rd of October 2012

How to add an actionlistener  

Hi all, How to add an actionListener to Jlabel object. Any examplet would appreciate? Thanks Continue Reading
Views : 39
Tuesday 23rd of October 2012

JPanel width  

Does anyone know how to change the width of a panel? I tried using: JPanel panel = new Continue Reading
Views : 53
Tuesday 23rd of October 2012

JTreeTable and custom renderers/editors  

Hi there I am busy with a JTreeTable and now that I have the table working I need to put indiviual cell editors/renderers on column[1] (ie, not the tree column but the next column.) The tree represents news items that people can... Continue Reading
Views : 49
Tuesday 23rd of October 2012

SWT - Popping up new Window  

This is definitely a greenhorn question. I am working on some SWT tutorials, but I have a requirement to go from one screen to the next. In this case, I want to go from a Login screen to the main screen, when the user presses the "LOGIN" button. I cannot get it... Continue Reading
Views : 47
Tuesday 23rd of October 2012

Problem with JTextArea  

I have a small problem with JTextArea, and I believe I know what causes it, but not sure how to correct it. When I call one in a frame it... Continue Reading
Views : 57
Tuesday 23rd of October 2012

paint() and performance  

If you limit yourself to the AWT (vis?a?vis Swing) then I would make an offscreen buffer (an image), and render the text to it, and paint it in the paint method. This should relieve the paint method of re?calculating everything with each small movement of... Continue Reading
Views : 62
Tuesday 23rd of October 2012

GUI builders in Real life !  

Hola. does any body know if there is a commercial swing application built using a GUI builder (like Jbuilder or netbeans of intellij) ? it seems to me that Java GUI builder are not used and every company uses the usuall way without the help... Continue Reading
Views : 64
Tuesday 23rd of October 2012

TableCellRenderer with JLabel setBackground help  

Hi there In a specific instance I need a column of a table to look blank. So I have coded the renderer as follows... class BlankCellRenderer extends JLabel implements... Continue Reading
Views : 81
Tuesday 23rd of October 2012

Class inheritence and GUI question  

Hi all. I am working on a server program that has a GUI. I created the server code in a separate class that is in herited by a thread initiated by a button in the GUI. I would like to bounce text messages back from the server class to the GUI (and display them in... Continue Reading
Views : 65
Tuesday 23rd of October 2012

Closing a dialog box  

What kind of code would I use to close a dialog box automatically when a certain number is entered and ok is hit. Continue Reading
Views : 58
Tuesday 23rd of October 2012

MVC Model between Swing and Web Services  

Dear all, I have a project using swing as frontend and Web Services as the middle-tier. Can anyone help me to analyse which is M, which is V and which is C in these swing and web services relationship? Thanks... Continue Reading
Views : 65
Tuesday 23rd of October 2012

Display File Icon on mac OSx  

I have an java applet that is intended to be run on various... Continue Reading
Views : 45
Tuesday 23rd of October 2012

how to blink the Jframe title bar  

daer sir, i am amit working on j2ee/swing technology and developing a chat server. i have the same problem which u have faced probably i.e. the problem of blinking jframe title bar. actually i have acrossed... Continue Reading
Views : 86
Tuesday 23rd of October 2012

Centering JOptionPanes and JDialogs  

How to center the JOptionPanes and JDialogs. I want them centered on the screen. Any ideas. Thankxs in advance. Continue Reading
Views : 48
Tuesday 23rd of October 2012

Double click as a single click on JButton  

How can I force a double-click to behave as a single-click on JButton? Sometimes, a double-click behaves as two single-clicks... Continue Reading
Views : 55
Tuesday 23rd of October 2012

Find index by xy   

Hey I got an Array that contains info about words, and the position thay shold be printed on the Drawing. I use a defultStyledDocument where i use colors. Say that the first word is placed some rows down, and i only got... Continue Reading
Views : 50
Tuesday 23rd of October 2012

looking for simple examples/tutorials...  

Hello happy hackers... I'm looking to deploy a windows app using SWT but I need it to appear as "native" as possible, including the use of an executable (.exe) to launch the app. I'd also like to know if there are any installer-wizards... Continue Reading
Views : 45
Tuesday 23rd of October 2012

Avoiding multiple instances  

Hi everyone.... What's the best way to disallow launching of multiple instances of my GUI application? Static flag, checked in main() method? Something else? Thoughts? Questions? Comments? Thanks! ... Continue Reading
Views : 46
Tuesday 23rd of October 2012

position cursor  

a)how to position the cursor to a desired line in JTextArea. and b)if the area contains a large document how to page up... Continue Reading
Views : 60
Tuesday 23rd of October 2012

1st question with app  

Hi I'm diggin' into the search to find a complete answer for this. I'm building an app with 4 different windows: 1.- Logon Window 2.- Select window. 3.- Data work window. 4.- Bye window. Actually everyone... Continue Reading
Views : 68
Tuesday 23rd of October 2012

JFileChooser  

I ran into this in Perl too. The solution was to explicitly append the extension to the file name, otherwise it's only saved with the name the user entered. The purpose of a file filter is to filter out filenames with other extensions from the file... Continue Reading
Views : 45
Tuesday 23rd of October 2012

frame calling another frame  

Background: : I have two frame/classes. A login screen and a "display results" screen. A login screen has a login button which takes you to display results screen. Display eesults screen as a logout button however... Problem: when you click on... Continue Reading
Views : 90
Tuesday 23rd of October 2012

JTables  

Quick general question for some of you more advanced guys. When using JTables do you generally use DefaultTableModel or... Continue Reading
Views : 51
Tuesday 23rd of October 2012

Painting components over images  

I've exteneded a JFrame and overridden it's paint() method because I want to draw an image in the background and then display a component on... Continue Reading
Views : 501
Tuesday 23rd of October 2012

when to dispose of widgets/objects  

From what I've read, I'll have to dispose of SWT widgets manually as they are calls to native resources. When should I dispose of widgets and are there other resources I need to be disposing of manually? Continue Reading
Views : 63
Tuesday 23rd of October 2012

GUI - darklight input in the password field  

I am coding a password needing password input using GUI. The following is text input, and show the input ************************ myTextFieldTableF11.setForeground(Color.black); ... Continue Reading
Views : 65
Tuesday 23rd of October 2012

JLabel - Receiving Focus  

Hi, Can a JLabel use the focus listener? I have an application where images (JLabels) can be moved around a Continue Reading
Views : 53
Tuesday 23rd of October 2012

Very sloooooow scrolling  

in my app, with several tabbed panes, i've the following structure: contentPane jtabbedPaneExt jscrollPanel1 jTabbedPane1 jScrollPane7 jPanel1 my app works nicelly, except if i use the arrow... Continue Reading
Views : 62
Tuesday 23rd of October 2012

Playing multiple audios  

Hi everyone, I'm building a Swing GUI, which has a background music( thread ) running constantly in background. I want to play some audio clips when user perfoms some operation with still background music running. Somehow I'm not successful. Is... Continue Reading
Views : 52
Tuesday 23rd of October 2012