Dialog « Dialog « Java Swing Q&A





1. Yes/No dialog in Java ME    stackoverflow.com

I'm looking for a simple solution for a yes/no dialog to use in a Java ME midlet. I'd like to use it like this but other ways are okey.

if (YesNoDialog.ask("Are you ...

2. Why do my JDialogs leak?    stackoverflow.com

I have a JFrame and I open a JDialog from it and another JDialog from that dialog - which menas i have 3 windows visible (JFrame, JDialog1, Jdialog2). When I close both ...

3. On dialog boxes    stackoverflow.com

I'm trying to make a dialogue box which displays an answer and will print to the screen but am having no success. The code looks like this:

/*
 * To change this ...

4. Preventing unncecessaries duplicates of dialogs in Java Swing    stackoverflow.com

Does exist in the JDialog class a way to prevent that a child window (JDialog) would be displayed more than once when the button from the main window (JFrame) used to ...

5. How to customize dialogs?    stackoverflow.com

I need to make some textFields and other in it and implement some logic. Is it possible?

6. Creating Java dialogs    stackoverflow.com

What would be the easiest way for creating a dialog:

  • in one window I'm giving data for envelope addressing, also set font type from list of sizes
  • when clicked OK, in ...

7. Instructions Package for Java    stackoverflow.com

I want to make a help/instructions page for my Java program but I really don't want to have to go through and program all the frames and searching and such. ...

8. "Whiteout" entire swing GUI except from one component    stackoverflow.com

[This question is in relation to this question] Setting: I have this home-crafted "editable label" component which looks like a label, but when you click it, it turns into an editable ...

9. creating an xml from the values in a Dialog in Java Swing    stackoverflow.com

I have to create an xml file based on the value of attributes set by user in dialog of Java Swing.There are five attributes name,age,sex,date of birth and place. when the ...





10. Java Swing: Dialog with expanding / progressive disclosure?    stackoverflow.com

I've got a dialog in a desktop Java Swing app. What I want is a classic Windows-style Progressive Disclosure dialog, where pressing a "More Options" button opens up a whole extra batch ...

11. Loading dialog doesnt paints while loading other things    stackoverflow.com

I'm trying to do some kind of load screen while a heavy load code its working but i can't make the loading screen gets painted, it just have it's inside in ...

12. How to add to Dialog Boxes in Java (Swing)?    stackoverflow.com

Possible Duplicate:
Simple popup java form with at least two fields
I'm trying to make a Dialog Box that has multiple buttons, places to enter text, ...

13. dialog box problems    coderanch.com

Hi all, I'm quite new to Swing so please have patience if my question is quite basic. I have a swing app in which I am trying to display a dialog box on the selection of the 'Quit' menu item. So far, I can display the dialog box, but I can't figure out how to dispel the dialog box upon selection ...

14. Dialog Box    coderanch.com

15. page setup dialog    coderanch.com

16. Dialog Box    coderanch.com

Here is a dialog class I made as a practice exercise: import java.awt.*; import java.awt.event.*; public class mcDialog extends Dialog implements ActionListener { mcDialog(Frame parent, String title) { super(parent, title, false); setLayout(new FlowLayout()); setSize(300,200); Button b; add(b = new Button("Cancel")); b.addActionListener(this); // it listens for its own events } public void actionPerformed(ActionEvent ae) { //same as VB's Unload Me (as opposed ...





17. simple? dialog box    coderanch.com

how do i Write a simple class called Message with a single public method that brings up a modal dialog with a user specified string message. The box should have a single button with the label "OK". When the button is pressed, the box is dismissed. This class should have a single static, public method with this signature: public static void ...

18. Dialog box problems :(    coderanch.com

Hi everyone - I've got a program with a frame as the parent window. The user enters some data into fields and I do a check to see if any of the fields have been left empty. If any have, I want a small dialog box to pop up saying "You forgot to fill 'n' window" .. I created the dialog ...

20. HELP - JDialogs!    coderanch.com

21. dialog example Urgent    coderanch.com

You would just create a JOPTIONPANE. When the user clicks on YES, you could call "System.exit(0)" just like you would if you were closing the window by click the window manager exit button at the top right of the window (top left if you use Mac OS X). I know this isn't an example, but the code for it is rather ...

22. Dialog Box Problem    coderanch.com

23. JColor Chooser Dialog    coderanch.com

hi, i am opening a Jcolor chooser dialog.i am getting user input from this one. In this HSB Tabbed Pane, if i select radiobutton "H" and if i didn't enter any value and said OK. Then i again opening dialog .i want to have value "0" if the user didn't entered any value in the textfields in ("H" or "S" or ...

24. How to make a dialog to keep in English    coderanch.com

Hi all, When I use a static method to show a dialog during my application running, however the dialog will contain at least button that have a label in it. The problem is that the button's label is in your local languge automatically ,for example, in Japanese or Chinese. Is there any way to make a dialog to keep in English??? ...

25. Problem reactivating JDialogs    coderanch.com

Thanks for the feedback. I actually have been very good about parenting my dialogs. Primarily so I can center them over the parent frame. So, the owner thing is not the problem, most likely. Rather it is a window listener issue of some sort. In one case, when the system focus returns to the APP, I get the currently open dialog, ...

26. unwanted dialog box    coderanch.com

27. CheckboxGroup in Dialog    coderanch.com

28. Swing dialog not visible    coderanch.com

29. Dialog in AWT    coderanch.com

import java.awt.*; import java.awt.event.*; public class test implements ActionListener{ Dialog aDialog; public test(){ Frame aFrame = new Frame("aFrame"); Button aButton = new Button("Show Dialog"); aButton.addActionListener(this); aFrame.add(aButton); aFrame.pack(); aFrame.show(); aDialog = new Dialog(aFrame, "aDialog"); aButton = new Button("Hide Dialog"); aButton.addActionListener(this); aDialog.add(aButton); aDialog.pack(); } public static void main(String args[]){ test t = new test(); } public void actionPerformed(ActionEvent ae){ String command = ae.getActionCommand(); ...

30. problem with JDialogs    coderanch.com

31. dialog box warning    coderanch.com

hi, i have witten a GUI that requests user input. If the input is incorrect then a warning appears(using JDialog)to advise the user. the problem is that if the user repeatedly enters incorrect input, then the same warning is produced many times. i would like for that warning to appear only once and for the GUI to become inactive until the ...

32. Dialog boxes    coderanch.com

33. dialog box    coderanch.com

how do i make the users input to a input dialog box hidden like in the case of entering a password. also can i take more than one item of input form a dialog box? maybe i want to take a name and an option from a combo box! with thanks# z

35. Implementing function in new dialog    coderanch.com

36. Problem when multiple dialogs popped up at the same time?    coderanch.com

Hi, there: I'm using JDK1.3.1 Swing. When application began, I have a thread spawn(actually, a timer task) which may pop up a modal dialog sometime later. And, from main application thread, I'll pop up another modal dialog as well. The problem is when both dialogs are popped up, those buttons like "OK", "Cancel" on dialogs did not work any longer. And ...

37. Flexible Dialog Box    coderanch.com

Hi I plan to create a modal dialog box that can accept few input parameters. Maybe like a frame that can contains all sorts of components like tabbedPane, Buttons, etc BUT acts like a dialog box, means that I have to click a button in the main frame before the "dialog box" can appear and I have to click either "OK" ...

38. Making menus and dialog appear faster    coderanch.com

39. double dialogs    coderanch.com

Hello I have a dialog that I can create and center on the screen fine. On it there are buttons off of which I launch another modal dialog box.. (Yes I know that I should use tabbed panes, however that is overkill for this app). The problem is that I cannot reference the frame of my original centered dialog box, therefore ...

40. Creating Dialogs    coderanch.com

Im having some problems creating and using dialogs.My code is pretty much based on the following: public class Editor { JFrame aframe = new JFrame("Editor"); Editor() { aframe.setBounds(0,0,799,580); aframe.add(new Find(this)); } public static void main(String[] Args) { Editor editor = Editor(); } public void doFind() { FindDialog dlg = FindDialog.createDialog(aframe,_findText,_ignoreCase ); } } class Find { Editor editor; public void actionPerformed(ActionEvent ...

42. Dialog box using Netbeans    coderanch.com

Hi All, I am developing a Java application and I am using netbeans for the GUI. I have a main window for which I used a JFrame class and I have a menu in that. When the user clicks that menu item, I want a modal dialog to open. I want to have a number of buttons on that dialog to ...

43. Preference dialog    coderanch.com

The Preference dialog what I mean, is the preference Dialog which is defined in the package org.eclipse.jface.preference.preferenceDialog. this is the same dialog when you click in the eclipse IDE on Windows -> preferences. But in my dialog there are only two pages. And when i will open the dialog over the button. the focus should have the page 2. How can ...

44. Dialog box    coderanch.com

I just have a quick question regarding MVC and dialog boxes. In a well designed MVC setup, is it better to (1) have a dialog box setup as an entirely seperate entity? Or do you (2) have it closely coupled to your main window? Specifically the controller implementing *all* action listeners for the application. I am doing the SCJD. Currently I ...

45. Startup dialog    coderanch.com

I would like to create a pop up dialog that displays the application details while waiting for the main application to load. I've tryed using a dialog that displays an Image and plan to use a timer such that the dialog is displosed of after a set time. Not sure if this is the best approach. The dialogs title bar gives ...

46. doubt in jfileopen dialog box    coderanch.com

47. how to create this dialog box?    coderanch.com

48. How to capture dialog boxes    coderanch.com

Hi, In our application, we need to know and capture when a dialog box pops up. getWindows() in JDK 1.6 does that for us, but we need to do the same in 1.5 too. Is there a way to capture dialog boxes. I have tried component and container listeners on a panel/frame but that does not work Regards Kiran

49. creating my own dialog box    coderanch.com

Hi, i'm creating a simple window that allows the user to enter some text...the problem I'm having is that I want the rest of the application to wait until the user has entered the data before continuing to process data. For example, I have a similar function in the app that uses a JFileChooser; in that case, the file chooser dialog ...

50. Simple Accept / Reject Dialog refuses to work    coderanch.com

I thought this part would be easy. It's ended up costing me hours of failed attempts. My problem: I'm creating a program to assist a fantasy football team owner during a live draft. The program will recommend a player when it's his turn to draft. I have the main functionality of the system working. But the part where it asks if ...

51. Dialogs    coderanch.com

i have a dialog that calls another one while pressing a button. I would like that the first dialog is blocked till the second one is opened. How to do? i have a dialog made with netbean, i have some jLables and a jTextField that even if i change them the name, always have the old name, why??

52. Creating a dialog in a listener    coderanch.com

Ok, so I'm trying to have an actionListener that, when triggered, creates a dialog with a progress bar. Seems like this would be a pretty common thing to do - you hit a button, a popup comes up saying 'Loading...' or whatever while it's processing something. But here's the problem - the progress bar never appears. The dialog comes up, but ...

53. Dialog    coderanch.com

I'll add my interpretation of the OP's question, but I don't know the answer. The OP is asking how to make the inactive windows 'look' inactive or unselectable. I've seen this done by changing the opacity or apparent brightness of the background windows by shading or dimming them. Is this sometimes controlled by the default look and feel?

54. I'm trying to add a separate dialog to a Java program...    java-forums.org

I'm trying to add a separate dialog/window to a Java program that collects the user's information from three different text boxes. I have looked at the sun tutorial, swing textbooks, and a graphic java text, but I'm still confused. How do I layout the three textboxes and the four related labels in the dialog? And how do I get this information ...

55. How do I get all dialogs?    java-forums.org

Use Window#getWindows() and iterate over the returned array testing for instanceof Dialog (or JDialog, if this is Swing). Depending on your specific requirements, it might be desirable to first invoke System#gc() to purge the array of Windows which are no longer reachable. But more important, why do you think you need this? There's probably a better way to do whatever it ...

56. A customized dialog box    java-forums.org

Hi All, I am new to this swing... Can you provide me the code to create a custom dialog box.. This dialog will not have close window (cross) button in title bar and java cafe icon should be there. Please look in to the attached image ..i need exactly like that.. Please find the attachement img.jpg (this is i created .. ...

57. Confirm Dialog box ?    java-forums.org

I don't think posting always the links of those tutorials is a better help....I always go through them and I can't understand a thing...(it's just my opinion but they are really bad - I never found something useful)....if you have never done this kind of things, how can you learn them? He showed me the code, so that next time I ...

58. Dialog    java-forums.org

Hi All I am student of MCA.I want to know how can i develop a About Dialog.About Dialog means..A dialog have a one picture and multiple label.As we see all software have a help menu and help menu have a About Dialog.As like that i want to develop.Can any one give me example link or some code... Plz help me..

59. Swing - Dialog Sections?    forums.oracle.com

Can it be done with Swing? Absolutely. Easily? Well,... it would take a bit of work. I think that you would need to learn well the various layout managers, in particular the FlowLayout, BoxLayout, BorderLayout, and GridBagLayout. You would also have to study the different borders, the BorderFactory.createXXXX static methods, and in particular the BorderFactory.createEtchedBorder(...) and BorderFactory.createTitledBorder(...) methods.