o
k
q
u
e
s
t
i
o
n
s
.
c
o
m

Difficulty grabbing info from a JList. -

Hi everyone, this is my first post here!

I have a JListBox which is getting its contents from an Array (containing names of months.)

I need to produce an IF statement to determine how many days there are in a month, for example, I need to say something like :

If (contents of selected field in JListBox = "February")
Do this

However, I'm new to Java and any attempt I have made has mucked up.

I thought something like :

String CurrentMonth = JListBox.getSelectedValue();
if CurrentMonth = "February"
Do this (something to only produce 28 boxes etc)

Would work, but it doesnt for some reason. The error is "Incompatible types."

Could someone point me in the right direction?

Also is there an easier way of determining how many days there are in a month within Java?

Thanks!

 

Difficulty grabbing info from a JList. -
Hi everyone, this is my first post here! I have a JListBox which is getting its contents from an Array (containing names of months.) I need to produce an IF statement to determine how many days there are in a month, for example, I need to say something like : If (contents of s


Alignment of JList and JComboBox -
I would like to know how to set the horizontal alignment of JList's and JComboBox's. I've searched google but can't find anything. If you know how to do this please let me know. NOTE: I tried this on the JList but it had no effect: Code: JList.setAlignmentX(JList.CENTE


Grabbing CD info -
Grabbing CD info Can you grab the info from a music CD thats in the drive. I.e. get how many tracks, length of tracks. Or if anyone has made a project like the cdplayer.exe & cdplayer.ini like found in win9x? Thanks


jList -
For the love of sweet jesus I have spent the last hour trying to figure out how to add strings to a jList from a button. How can I do this? Lets say I want to add "A" "B" "C" "D" to jList1 which has already been drawn on the form. Thanks


jList -> get first element -
How can I get the first element in my jList?


Grabbing part of info -
how can i grab selected lines of info off a website and use it for my application?


Pulling Needed Data from a String -
I have a Listbox that has info from a file, the input is in 2 parts, first there is info then a hyphen (-) and then more info. What i have now is a Label, so when i click on a piece of info in the listbox that line of info shows up in the label. What i need to do is take the info bef


Grabbing client info over NT Network. -
I want to be able to view all domains and connections and be able to pick one and then recieve their IP info, computer name and current login name. Please help M.


Need help with GUI's and JLists.... -
I am working on an assignment for my advanced Java class. We are doing JLists for GUI's. I am not that good with GUIs, and I am having problems with valueChanged() method. I havent worked much with JLists before, so i am very new with them. I am getting the error, inconvertible typ


Grabbing text/images from webpage using Vb/VB.net -
Does anybody know what is the api use for grabbing contents from webpages in vb/vb.net? can you gimme a small example.


Need applet help.. -
Here is the thing i want to do. open an applet - load a text file into a Jlist. The text file will contain html web site links. The applet has to go open all the links inside the list and wait 30 seconds or so between each web page surf. I know how to load a txt file and get a l


Multiple DataSets -
How much do multiple datasets affect performance? Is it better to have many datasets grabbing only 1-3 columns each, or one dataset grabbing everything? Also, I'm using VS'05 and Access '07 if that factors in here. Hopefully that makes sense. Thanks!


Grabbing items from a treeview -
Hi all, I am trying to grab all of the items in a treeview and add them to a listbox in VB. I have no problem grabbing the items in a listbox via API starting off by using LB_GETCOUNT and adding them to a listbox in VB. But when I try to grab them from a treeview, LB_GETCOUNT return


"Invalid index" on JFileChooser -
I have no idea why this problem is happening, but whenever I try the following code: Code: jFileOpenProject.setCurrentDirectory(myFile); where jFileOpenProject is a JFileChooser and myFile is a File object pointing to a directory. I get the following: Quote:


Grabbing info from WoW (world of warcraft) -
I need some advice. I am wanting to grab info from the World of Warcraft window. What I want to be able to do is grab the toon name of whoever is logged in. I am unable to figure out how I can do this, it would make my multibox program just that much better if I was able to a


Grabbing contents off a webpage. -
Hello there. I was wondering if anyone could provide me with any help on grabbing data from a webpage in VB 6, and looking for particular elements, and showing them elements only, ie a date. I've had a look for a few guides and tutorials although nothing substantial which shows me


grabbing internet icon -
is there any way of grabbing the icon at the side of the address in internet explorer. thanks.


Grabbing info from other web servers -
I want to grab information from other web server without leaving my webserver, in this process i want to send this paramter mainly to other webserver 1) The browser name. any suggesstions on this regard will be highly helpful


PHP parsing Problem -
Hey, was looking for a bit of php help for a page I'm making. Just as a note I'm learning php currently but I'm not great at it so any help would be great. Heres what I want to do; the page URL is:http://www.whatever.com/whatever.php/123 now I'm trying to make a php program th


[2005] saving a quality jpeg -
Hello everyone - Right now I have a program that loads lots of info into a form with a high res pic background. When I save the form, though - I lose a TON of picture quality. Normally this wouldn't matter, but the app is for my parents business (printing) where quality looking


Updating/Creating records -
I have a table The table contains 12 records (on the key I am using), but I am only grabbing 6 of them as I am only selecting those records where the 'current flag' is set to 'Y' I need to : a) get these records b) replicate the data, but 1 field is a date field so I will po


SQL Statement for grabbing a single field from another table -
what sql that would let me gather info from a field of another table table 1 name year level id number table 2 club club president and my grid will show the id number of the president whose info will be found from table 1.


Accessing anther class components -
I have two classes how can I use the JList from another class each class has its file ??


Saving scores in a game!!! Please HELP!! -
Before i ask the question i will give you a brief understanding of the game i have created, hopefully this will help you help me (note the optimism here) I have created a Who wants to be a millionaire type game with three difficulty levels (beginner, medium and advanced) once a di


Grabbing data from invisible fields (gridview) -
So I have bound field thats converted to a Template field. Is it possible to grab the info from the Template field? Thanks,


Grabbing Logon Name -
Does anyone know how to grab the current user's logon name?? (Logon on to an NT Domain.) Is it different for Win9x/NT/2000 ? If so, how can you determine what the current user is running for an O/S. I'd imagine all this wonderful info is in the registry somewhere right?


grabbing user info with .vbs -
this is for a vbs file. i know how to do a msg box thats just msgbox "" but i want a msgbox with a text box in it that when someone opens the .vbs file it will pop up they will enter something then i want to put what they entered into a variable. thanks in advance.


To Preeti.... Thanks For All The Help -
Hello: In regards to my question about manually inputing data from text box's into my database, thank you for all the help. I had a little difficulty in figuring it all out, at first. But with the info you gave me, it really works. Man O' man, just goes to prove, even a "bonehe


Please help me fix the problem. -
Hi. I use the constructor to get the information from the database, but it doesn't complie. Here is my code for the constructor. ============================================= public getData() { Connection c = DriverManager.getConnection_("jdbcdbc:GradeData"); Resul


grabbing cd drive info -
How do i see if a PC has a CD drive and determine if its a CD drive or a DVD drive? thanks


Grabbing html code from Internet Explorer_Server controls -
Does anyone have any code dxamples for grabbing the html/text from the Internet Explorer_Server controls? I don't want to re-navigate - some of these controls are used in other apps to display information. I need to get it directly from the controls by passing the handle for it to this


Display contents of Form keep getting erased -
Hi! I'm having a problem with the contents of my forms data getting erased. My application is grabbing data from a USB 2.0 digital camera. I call a camera function called VbStartVideo which has a parameter that points to the frame buffer that receives the data. In my case I'm g


Grabbing screenshot over the network -
Does anyone have any ideas for grabbing a screenshot from a computer over the network? In other words, I want my VB app running on station 1 to be able to retrieve a screenshot of station 2 without running any code on station 2. Is this possible? Thanks!


[02/03] Grabbing image from page loaded using AxWebBrowser -
I am trying to download an image to my hd from a webpage. Right now I am grabbing the html source and going through it to find the link to the image. Doing this means I'm requesting it from the site twice so sometimes it times out and the image won't download after the page loads.


Dynamic Website Need suggestions! -
I am looking to make a site for a friend who runs a movie company. Ive done a little html in the past but one of my other friends is going to take care of that since hes into PhotoShop and stuff like that. Anyway since i have never designed anything for the web i am a bit confused as t


Grabbing Information From A Webpage -
Hello everybody! . I am creating a project to aid playing an online game called runescape (not it is not anything against the rules), but I need help "grabbing" information from a webpage. One of the webpages on RS has all the world information, including how many people


Reading and Reformatting a TXT file -
Hi, I'm new to VB and I was wondering if someone could help me with this issue. I've just downloaded Visual Basic 2008. Basically, I have printed a multi-page PDF into a single TXT file. I want to write a script that can go through the TXT file and make some formatting changes, and


[02/03] Advice needed on best structure for this program -
I am looking for some advice on the best underlying structure that this program should have as I’m relatively new to this. I’m simply looking for advice and things to consider about it that I haven’t considered already, or more likely – don’t even know about! I have already l


Apostrophe OCD -
I may have Apostrophe OCD. Within a span of 15 minutes, I have seen a large number of threads on VBF with improperly placed apostrophes and I am having difficulty breathing. The urge to correct the poster is overwhelming (and I feel like scratching the monitor to 'rub' the apostrophe


Chart question -
I have an app that logs info into a text file. I need to create a Line Chart but I am having great difficulty. Is there a way that I can set my app to log to a different file type or something so it can Automatically/Programmatically create the chart in VB? Thanks for the help in ad