Sponsored Content
Top Forums Programming Java File Chooser customization Post 302221990 by ajgwin on Tuesday 5th of August 2008 06:17:44 PM
Old 08-05-2008
Java File Chooser customization

I am trying to add some other things onto the standard file chooser. I would like to have something like this at the bottom of the file chooser (underneath the Select and Cancel buttons). I will try to make this as legible as possible:

File Name:
File Type:
Select Cancel

A list or something of the sort that can only have one value selected:

Sorts
Plots
Both

2 checkboxes that can both or neither or either one be checked:

Print
Alerts

I can do the sorts,plots,both part in a different dialog box like this:


Object[] possibilities = {"Create PDS sorts file (*.txt)", "Create PDS plots file (*.ps)", "Create both sorts and plots files"};

String s = (String)JOptionPane.showInputDialog(this,null,"Batch Parameters",JOptionPane.PLAIN_MESSAGE,null,possibilities,possibilities[0]);

I really want this to appear on the file chooser dialog box. It doesn't have to be in the list type thing that it is in, but that would be nice.

I have found something called setAccessory, but I don't really understand how it works.

Any help would be great. Thanks.

Allyson
 

4 More Discussions You Might Find Interesting

1. Linux

kickstart centOS 5.1 ---customization question

I am doing a centos 5.1 kickstart install for a school project and was wondering if there is a way to install a custom desktop background image.(upon 1st time logging into system) (instead of showing the default centos desktop background, it would show a custom image) Would i have to create a... (1 Reply)
Discussion started by: nuGz
1 Replies

2. Ubuntu

Grub customization

I installed 9.10 this weekend. It's a fresh install. It installed GRUB, which works great, but with the 9.04 install I could customize the Grub menu (color, default OS and timeout) by editing /boot/grub/menu.lst. That file is no where to be found on this install. I've searched and all I find is... (4 Replies)
Discussion started by: dday
4 Replies

3. UNIX for Dummies Questions & Answers

Customization within UNIX/AIX

Hey guys I am sorry if this has been posted before but I have not been able to locate. How can I set up after I cd to a directory it displays above my command line after I enter into it? Also to get to the previous command I cannot press up on my keyboard it just moves up. How can I change... (17 Replies)
Discussion started by: Koopa_Troopa
17 Replies

4. AIX

Any file to differentiate JAVA JRE and JAVA JDK

Folks, Any idea of where can I find a specific file to differentiate JRE and Java JDK installed on AIX platform :cool: (3 Replies)
Discussion started by: dellcisco
3 Replies
Dialog(3)						User Contributed Perl Documentation						 Dialog(3)

NAME
Tk::Dialog - Create modal dialog and wait for a response. SYNOPSIS
$dialog = $parent->Dialog(-option => value, ... ); DESCRIPTION
This procedure is part of the Tk script library - its arguments describe a dialog box. After creating a dialog box, Dialog waits for the user to select one of the Buttons either by clicking on the Button with the mouse or by typing return to invoke the default Button (if any). Then it returns the text string of the selected Button. While waiting for the user to respond, Dialog sets a local grab. This prevents the user from interacting with the application in any way except to invoke the dialog box. See the Show() method. OPTIONS
The following option/value pairs are supported: -title Text to appear in the window manager's title bar for the dialog. -text Message to appear in the top portion of the Dialog. -bitmap If non-empty, specifies a bitmap to display in the top portion of the Dialog, to the left of the text. If this is an empty string then no bitmap is displayed in the Dialog. -default_button Text label string of the Button that displays the default ring. -buttons A reference to a list of Button label strings. Each string specifies text to display in a Button, in order from left to right. METHODS
$answer = $dialog->Show(?-global?); This method displays the Dialog, waits for the user's response, and stores the text string of the selected Button in $answer. If -global is specified a global (rather than local) grab is performed. The actual Dialog is shown using the Popup method. Any other options supplied to Show are passed to Popup, and can be used to position the Dialog on the screen. Please read Tk::Popup for details. ADVERTISED WIDGETS
Because Tk::Dialog is a subclass of Tk::DialogBox it inherits all the advertised subwidgets of its superclass: e.g. "B_button-text", where 'button-text' is a Button's -text value. Additionally, Tk::Dialog advertises: message The dialog's Label widget containing the message text. bitmap The dialog's Label widget containing the bitmap image. EXAMPLE
$dialog = $mw->Dialog(-text => 'Save File?', -bitmap => 'question', -title => 'Save File Dialog', -default_button => 'Yes', -buttons => [qw/Yes No Cancel/); KEYWORDS
bitmap, dialog, modal, messageBox perl v5.12.1 2007-05-05 Dialog(3)
All times are GMT -4. The time now is 11:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy