populating a JList


 
Thread Tools Search this Thread
Top Forums Programming populating a JList
# 1  
Old 09-29-2010
populating a JList

Hi,

I have to create a JList and the items I need to display are store in HashMap table. What would be the easiest way to populate this JList. Basically the items I want to display/show in the JList are the key values of the HashMap. Thanks in advance for any suggestions.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Please help in populating output in table using shell scripting

Below is my code where i tried using table tag to print out put in table but its not working #!/bin/ksh #] && . ./.profile 2>/dev/null if test -f '.profile'; then . ./.profile; fi; #. .profile LOG_DIR=/app/rpx/jobs/scripts/just/logs sendEmail() { pzCType="$1";... (5 Replies)
Discussion started by: ankit.mca.aaidu
5 Replies

2. Shell Programming and Scripting

Populating a BASH array with a list of files including spaces-in-the-name

For the record, I already tried telling mgmt and the users to disallow spaces in filenames for this script, but it isn't happening for a number of ID10T-error-based reasons. I have simple list of 3 files in a directory that are named like this: bash-3.2$ ls -1 file* file1 file1 part2... (2 Replies)
Discussion started by: ckmehta
2 Replies

3. Programming

Populating Lists in Def using Python

Dipping around in python again and need to create a def that will populate a list(content) with the files that os.walk finds from within this directory and then I will re.search through each files looking for content. In learning Python, can someone point me in the right direction. This is what I... (3 Replies)
Discussion started by: metallica1973
3 Replies

4. UNIX for Dummies Questions & Answers

Help populating double quotes using awk

Want to populate double quotes for each filed using awk: Input: cat file.txt => "1-23-test_test1-test2" Required output : "1-23-test_test1-test2"|"#GT_properties_xyz" Was trying the below command on solaris 9 machine : awk -F"|" '{print $1"|""#GT_properties_xyz"}' file.txt ... (8 Replies)
Discussion started by: rajachandhok
8 Replies

5. Programming

Populating Associate Arrays in PHP

I'm not very good at associative arrays; and working on this PHP code has got me a bit stumped. My goal is to populate a (multidimensional) associative array in a PHP while look after a MySQL query. The code fragment looks like this: while($campaign_row = mysql_fetch_array($campaigninfo)) { ... (9 Replies)
Discussion started by: Neo
9 Replies

6. Shell Programming and Scripting

awk - Pre-populating an array from system command output

So, here's a scenario that requires the same logic as what I'm working on: Suppose that you have a directory containing files named after users. For awk's purposes, the filename is a single field-- something parse-friendly, like john_smith. Now, let's say that I'd like to populate an array in... (2 Replies)
Discussion started by: treesloth
2 Replies

7. Shell Programming and Scripting

Populating an Array

Guys, I need to iterate populate an array while going over files in directory. Can someone please tell me syntax I tried this but it isn't working ==> for F in `ls -p "${directory1}" | grep -v "\/"` do cd "${directory2}" cmp "${directory2}"/"${F}" "${directory1}"/"${F}" ... (2 Replies)
Discussion started by: Veenak15
2 Replies

8. Shell Programming and Scripting

Populating array raised an error

Hi, The following test case populate an array named: array3. Since array1 and array2 are equal in length and values array3 will remain empty. #!/usr/bin/ksh test() { set -A array1 "A" set -A array2 "A" NUM_1=`echo ${#array1}` print "num elenemt in NUM_1 is ${NUM_1}" i=1 for ELE2 in... (1 Reply)
Discussion started by: yoavbe
1 Replies

9. Shell Programming and Scripting

populating array using awk

Hi. I have a file with the following structer: DB DISK LOCATION SIZE ============================================ PROD DATA_01 /dev/dm-23 10 PROD DATA_02 /dev/dm-24 10 PROD DATA_03 /dev/dm-25 10 DEV DATA_04 /dev/dm-26 10 DEV DATA_05 ... (1 Reply)
Discussion started by: yoavbe
1 Replies

10. Shell Programming and Scripting

Awk help with populating variable

Hi, I'm looking for help trying to parse a data stream. Any help would be greatly appreciated. My awk statement is awk '/Aug/{a=$2}/vol/{print a, host, $1, $2, $3, $4, $5}' out.txt Sample Data Stream "out.txt" ----------------------------- # Aug 3 00:00:00 2008 ===== DF =====... (3 Replies)
Discussion started by: jmd2004
3 Replies
Login or Register to Ask a Question
XmbDrawText(3X11)						  XLIB FUNCTIONS						 XmbDrawText(3X11)

NAME
XmbDrawText, XwcDrawText, Xutf8DrawText - draw text using multiple font sets SYNTAX
void XmbDrawText(display, d, gc, x, y, items, nitems) Display *display; Drawable d; GC gc; int x, y; XmbTextItem *items; int nitems; void XwcDrawText(display, d, gc, x, y, items, nitems) Display *display; Drawable d; GC gc; int x, y; XwcTextItem *items; int nitems; void Xutf8DrawText(display, d, gc, x, y, items, nitems) Display *display; Drawable d; GC gc; int x, y; XmbTextItem *items; int nitems; ARGUMENTS
d Specifies the drawable. display Specifies the connection to the X server. gc Specifies the GC. items Specifies an array of text items. nitems Specifies the number of text items in the array. x y Specify the x and y coordinates. DESCRIPTION
The XmbDrawText, XwcDrawText and Xutf8DrawText functions allow complex spacing and font set shifts between text strings. Each text item is processed in turn, with the origin of a text element advanced in the primary draw direction by the escapement of the previous text item. A text item delta specifies an additional escapement of the text item drawing origin in the primary draw direction. A font_set member other than None in an item causes the font set to be used for this and subsequent text items in the text_items list. Leading text items with a font_set member set to None will not be drawn. XmbDrawText, XwcDrawText and Xutf8DrawText do not perform any context-dependent rendering between text segments. Clients may compute the drawing metrics by passing each text segment to XmbTextExtents, XwcTextExtents, Xutf8TextExtents or XmbTextPerCharExtents, XwcTextPer- CharExtents. Xutf8TextPerCharExtents. When the XFontSet has missing charsets, each unavailable character is drawn with the default string returned by XCreateFontSet. The behavior for an invalid codepoint is undefined. The function Xutf8DrawText is an XFree86 extension introduced in XFree86 4.0.2. Its presence is indicated by the macro X_HAVE_UTF8_STRING. STRUCTURES
The XmbTextItem structure contains: typedef struct { char *chars; int nchars; int delta; XFontSet font_set; } XmbTextItem; The XwcTextItem structure contains: typedef struct { wchar_t *chars; int nchars; int delta; XFontSet font_set; } XwcTextItem; SEE ALSO
XDrawImageString(3X11), XDrawString(3X11), XDrawText(3X11), XmbDrawImageString(3X11), XmbDrawString(3X11) Xlib - C Language X Interface X Version 11 Release 6.6 XmbDrawText(3X11)