104 Posted Topics

Member Avatar for turt2live

I don't know if your first "solution" will be possible or not... But I do know that there is a method of the File class called "lastModified()". The lastModiied method returns a long value representing the time the file was last modified, measured in milliseconds since the epoch (00:00:00 GMT, …

Member Avatar for turt2live
0
249
Member Avatar for Dean_Grobler

Hi there, I understand that this question might be better off in "hardwareAndSoftware/LinuxAndUnix/LinuxApplicationsAndSoftware". But the truth is, that it takes for ever for someone to respond to posts there, because I don't think anybody visits that forum alot. Anyways, back to the point... I'm trying to install the Java 1.6 …

Member Avatar for mKorbel
0
260
Member Avatar for Dean_Grobler

Hi there guys, I would just like to know how I would go about by searching through a <select> list in an HTML page? I assume one would use JavaScript for something like this. On the HTML page there's a textbox which the user can type in a keyword, and …

Member Avatar for haleel
0
7K
Member Avatar for Dean_Grobler

Hello there, I have a JSP page that has a couple of images in, when I type the address of the JSP directly in my browser the page loads, with images and all. But when I go the page, through my servlet [RequestDispatcher.forward()] the page loads but the images are …

Member Avatar for javaAddict
0
1K
Member Avatar for Dean_Grobler

Hey there guys! Since it's that time of the year, most people are just sitting at their desks, business is dead and you bored out your skull (Unless ofcourse you have a [B]real[/B] job). So I thought, hey, I've got a phone with all this extra crap on including games, …

Member Avatar for happygeek
0
429
Member Avatar for Dean_Grobler

Hello there, This is just a quick question. You know that servlets respond by printing out dynamic HTML code? Well, is it possible that instead of doing that, the servlet just redirects back to the HTML form that send the servlet the Form data in the first place? myHtml(sends form …

Member Avatar for Dean_Grobler
0
290
Member Avatar for Dean_Grobler

Hello there, I am trying to access Array elements in another class within my JSP and then parsing them into <select> tags. I'm getting 2 errors though stating that it cannot find the class "PopulateMainScr". Here is my PopulateMainScr class: [CODE] package ContactKeeper; import java.io.*; import java.sql.*; import java.util.*; public …

0
62
Member Avatar for Dean_Grobler

I'm busy working with servlets now and when I try and compile them, I get erorrs stating that it can't find javax.servlet etc. Getting errors where I do the import statements to them. So apparently I have to add that servlet.jar file to the CLASSPATH? And that file can be …

Member Avatar for peter_budo
0
659
Member Avatar for Chillin2
Member Avatar for Chillin2
0
106
Member Avatar for Dean_Grobler

Helew! I just wana know if someone might have an idea of how I can go about doing this: So attached I have a little example I whiped up. Say you have 3 buttons, button1, button2, button3. What I wana do, is when you click [B]button1[/B], it will magicly turn …

Member Avatar for javaAddict
0
117
Member Avatar for saifjunaid
Member Avatar for anand01

Hey man, You posted this in the wrong forum (sure JSP is Java still though). But go to the forum under "Web Development > JSP", you'll get your answers there faster. Cheers,

Member Avatar for ~s.o.s~
0
116
Member Avatar for bangor_boy

Whow, your question is either very vague/messed-up or I'm going mad.. Let me just make sure what you mean here, you want this method, to [B]Create a file[/B] with the name of the String that has been passed as the arguments for the method? OR Do you want to just …

Member Avatar for jon.kiparsky
0
128
Member Avatar for skylight25

By saying you want to 'block it' do you mean you want to disable all the buttons, textboxes etc in your mainFrame or do you just want to make it invisible?

Member Avatar for Dean_Grobler
0
196
Member Avatar for warook

What I like to do while taking on a new project is drawing out exactly how my program wil work, as in using flow chart for my logic flow, since it should use OOP concepts, draw out the classes/object you are going to create, how they are going to interact …

Member Avatar for JamesCherrill
0
319
Member Avatar for sToXiC

Your string can only contain digits or start with a "-" otherwise a NumberFormatException is bound to be thrown...

Member Avatar for sToXiC
0
161
Member Avatar for benjaminFowl87

Here's actualy a nice link to some free/online Programming ebooks. SNIP Hope you guys find this helpfull!

Member Avatar for pritaeas
0
101
Member Avatar for Dean_Grobler

Hi there, I thought this is probably the best forum to ask my question. I wanted to know, say you have like 5GB of data that you can use, supplied by your service provider each month. And say you have something like, 3 users connected to your line. Is there …

0
178
Member Avatar for Dean_Grobler
Member Avatar for Kraai
0
105
Member Avatar for Dean_Grobler

Hi guys, So the question is pretty straight forward. Any sites that are really cool with a HUGE variety? I'm mostly looking into downloading metal, just incase there's cool sites for that also. A little twist perhaps, is that I want to download it from work. But obviously there's a …

Member Avatar for Dean_Grobler
0
175
Member Avatar for Dean_Grobler

Hi there, I am getting a 'Cannot find symbol error' on an array in my "ViewContact" Class. The array has been created in the "MainScreen" class. Below I have pasted the code for both classes as to provide you with as much information as possible: The MainScreen Class: [CODE] package …

Member Avatar for Dean_Grobler
0
709
Member Avatar for Dean_Grobler

Hi there, This is just going to be a quick question. Also just note that I am i some "remote location" so I cant even show you my code. But what I want to know is this: Say you have a package called "myPackage" and inside that you have 2 …

Member Avatar for JamesCherrill
0
143
Member Avatar for Dean_Grobler

Hi there, I'm getting an error saying: non-static variable MainList cannot be referenced from a static context. My snippet of code where the error is occuring: [CODE] //this method is in a class called ViewContact public void printInfo(){ int index = MainScreen.MainList.getSelectedIndex(); } [/CODE] Now the List "MainList" is in …

Member Avatar for JamesCherrill
0
128
Member Avatar for Dean_Grobler

Hi there, In my little code snipet below I am trying to convert an arraylist to an array of type contact. Obviously it's expecting an arraylist of type contact to convert it to an array of type contact. But it's picking up the arraylist as type object for some reason. …

Member Avatar for Dean_Grobler
0
140
Member Avatar for pyprog

Good mornin' mate, If you have internet explorer, once you viewing a webpage, simply click on 'view > Source'. That will display the HTML of the webpage. Most often you'll get code like java,javascript etc will be in seperate files used in the webpage through simple "href" links (That then …

Member Avatar for Taywin
0
82
Member Avatar for Dean_Grobler

Hi there, A thread was started earlier about splitting up a String using the split() method of the string class. Reading that did help me quite a lot in solving a problem of mine that is VERY similiar. Say I have this in a txt file: "Dean Grobler 0794400541 NA …

Member Avatar for Dean_Grobler
0
179
Member Avatar for joss23

With the number the user then adds, and after you've converted it to an int. Use a switch statement to take appopriate action depending on the user input...

Member Avatar for joss23
0
109
Member Avatar for Dean_Grobler

Hello there, In one of my projects I'm working on currently. I have a 'cancel' button in my GUI window that is suppose to close the JFrame the button resides in. I have done some research on the web about this. But it seems like one has to write a …

Member Avatar for masijade
0
132
Member Avatar for hateme_devon

Oooh, I don't think that's possible man. That's obviously what they trying to avoid. depending if the game is a applet or a Servlet or something it might be more possible for the one or the other.. If you using internet explorer, click view > source. Then if you cant …

Member Avatar for masijade
0
250
Member Avatar for jamesyrawr

Hey man, whatsup! Check out the little piece of code here: [CODE] int btnClicked = 0; public btnActionPerformed(actionEvent e) { if(btnClicked==10){System.out.println("You win!"); else{btnClicked++;} } [/CODE] Then with the button moving and all that, there's a layoutManager (not sure which one) that you can set the x and y coordinates of …

Member Avatar for sharathg.satya
0
137
Member Avatar for Dean_Grobler

Helooo, Attached is a pic of my main screen of my program. Basicly it's a phone book app similiar to one you'd have on your phone. The thing that I can't wrap my mind around, is that you see the nice big textArea there? After you've added a contact now. …

Member Avatar for masijade
0
175
Member Avatar for Dean_Grobler

Hi there, Consider the following code, this is a little 'snipet' from one of my classes: [CODE] private void jMenu1ActionPerformed(java.awt.event.ActionEvent evt) { NewContact n = new NewContact(); } [/CODE] The method is expected to open a new Frame, where the class of the new Frame is called "NewContact". I've recently …

Member Avatar for JamesCherrill
0
374
Member Avatar for Xufyan

Hello, The name pretty much implies what it is, getter methods get variables, and setter methods set variables. Say for instance you a have a class called Contact, the "getName()" method in the Contact class would return the Name variable. Like so: [CODE] public class Contact { String firstName, public …

Member Avatar for imtiyaz41
0
460
Member Avatar for Dean_Grobler

Hi there, I just wanted to find out if one can have a actionListener() in one .class file and then have the actionEvent() in another .class file? If not, how would I go about to get the same effect? Thanks!

Member Avatar for Dean_Grobler
0
450
Member Avatar for Dean_Grobler

Hello! Attached is a file (GUI.png), I quickly did this in excel so.. It looks pretty crappy obviously. But when you take a look at the image and the layout of the components etc. What would you say is the best LayoutManager to use with this? GUI design is fun, …

Member Avatar for Adil Ahmed Zeb
0
135
Member Avatar for Dean_Grobler

Hi there, In the code below my ImageIcon isn't showing when I run the program. I always struggle with adding Images in my GUIs and it's irritating. Is there some all important rule that I should know or something? [CODE] //Create window Components JLabel lblrequest = new JLabel("Enter amount of …

Member Avatar for JamesCherrill
0
4K
Member Avatar for ashwiniku

Hi there, If I'm understanding you correctly. You can just use the 'getState()' method. Like so: [CODE]yourCheckbox.getState(); //This will return a boolean value, i.e true or false[/CODE] Hope this helped!

Member Avatar for Dean_Grobler
0
170
Member Avatar for judgemental
Member Avatar for 080346

Heloooo... If I get what you're saying, you mean that you can still drag the window and resize it when the program running and you don't want that? Just go: [CODE] yourJFrame.setResizeable(false); [/CODE]

Member Avatar for Dean_Grobler
0
139
Member Avatar for patil.vins

Are you too lazy or too incompetent to even start thinking about how you going to design this? So you just go onto some website, thinking "Hey, why don't I try my luck". With this attitute you not going to learn anything. Go think about what classes you going to …

Member Avatar for Dean_Grobler
0
55
Member Avatar for Sunshineserene

What might also work then in that case, is maybe just converting the string that you're getting to an int or what ever you want? As in: [CODE] myInt = Integer.parseInt(theStringThatYoureGetting); [/CODE]

Member Avatar for tong1
0
2K
Member Avatar for Dean_Grobler

Hi there, I've just switched to Eclipse. I've been using TextPad so Eclipse is pretty cool.. But I've been getting weird error messages that I don't understand/not used to. Here they are: [CODE]JButton btnEnter = new JButton("Enter"); btnEnter.addActionListener(this);[/CODE] Here the Error says: Multiple markers at this line. -Syntax on token …

Member Avatar for Dean_Grobler
0
200
Member Avatar for solitaryy

Wouldn't something like this work? [CODE] sqrXY instance3 = new sqrXY(instance1.xaxis+instance2.xaxis, instance1.yaxis+instance2.yaxis); [/CODE] I'm just guessing here by the way, I'm a student myself...

Member Avatar for solitaryy
0
124
Member Avatar for adityaagrawal

Sir, Googling "Web hosting" brings up numerous options from hundreds of companies. Should have no difficulty. Unless sir is staying in Kowloon Wallen City. Regards,

Member Avatar for adityaagrawal
0
207
Member Avatar for Little Bunny

Hmmm.. "There is a class Fruitlist which has a sub class apple" public class Fruitlist(){...} public class Apple() extends Fruitlist{....} "There is a class Fruit which has a sub class orange" public class Fruit() {...} public class Orange() extends Fruit {...} "FruitList uses Fruit" import Fruit; public class FruitlList(){...} "Apple …

Member Avatar for vaibhav1983
0
126
Member Avatar for glenak

If you want to develop for the web though things like Servlets and JavaServerPages(JSPs) that are available in JEE is some pretty neato stuff...

Member Avatar for Dean_Grobler
0
150
Member Avatar for Dean_Grobler

Hi guys, I have this assignment to do: Synchronize access to the instance variable, accBalance. Because accBalance is a double and not an object, it cannot be used as the monitor. Use synchronized methods or synchronized blocks of code, as appropriate. Simultaniously test two threads. Because the threads can complete …

Member Avatar for Dean_Grobler
0
149
Member Avatar for patilsunil47

Man you gotta be more specific than that, where is the data stored that you wana update? What data is it?

Member Avatar for javaAddict
0
70
Member Avatar for Dean_Grobler

Hi there guys, I got this assignment where I need to set a session attribute. Although I'm having problems since I cant set attribute that is of type double? I got these hints but since I've worked with doubleValue() or downcasting, the hints didn't help me much.. Hints: -Recall that …

Member Avatar for Dean_Grobler
0
239
Member Avatar for Dean_Grobler

I'm struggling with a servlet that's suppose to represent an "online banking service". Once you run the servlet you'll see it's an extremely simple example... You enter an amount in the textfield provided, then click on the apropriate button depeding what action you want to perform e.g. "deposit","withdraw" and "balance". …

Member Avatar for martin5211
0
98

The End.