36,051 Topics

Member Avatar for
Member Avatar for ku95

Hi I'm currently doing a connect 4 program and I need to write an apporpiate get and set methods so that the other classes can access this information. ('State of the autoplay' is simply whether red or yellow (or no-one) is set to have the computer make their move). I've …

Member Avatar for moutanna
0
115
Member Avatar for beforetheyknew

Hi guys revising for an exam and im fine with the theory stuff but heres one question: A large ornamental garden is open to the members of the public who can enter through two gates: east gate or the west gate. The management wants to determine how many people there …

Member Avatar for jwenting
0
116
Member Avatar for Illidanek

So in class we are making a program and we have a big problem with what is pretty much the last method we need. We want a download function, which basically takes a file already specified and copies it to the destination (and name) chosen by the user. WE have …

Member Avatar for Stefano Mtangoo
0
353
Member Avatar for sharathk60

hi i had created a Jtable Which Stores Data like below -------------------------------------------------------- a b c d e w q 1 2 9 -------------------------------------------------------- i want to get the cell value when i click to the cell... i tried lot but not got hte out put please help to get the …

Member Avatar for moutanna
0
120
Member Avatar for utopic

I am not really familiar with the whole [B]SEO[/B] process but I recently hired someone at <snip> to do the whole process for me. The person there made me know that it is not smart to include a lot of my content in my [B]Javascript[/B] files as they are not …

Member Avatar for joelchrist
0
110
Member Avatar for tapas.chand

hello, i am using preparestatement to insert muliple rows into database. [CODE]String query = "insert into table_temp(col1,col2) values(?,?)"; pstmt = con.prepareStatement(query); pstmt.setString(1,"a"); pstmt.setInt(2,100); pstmt.addBatch(); pstmt.setString(1,"b"); pstmt.setInt(2,null); pstmt.addBatch(); int[] cnt = pstmt.executeBatch(); [/CODE] My problem is that in the 2nd addBatch block i dont want to insert any value into the …

Member Avatar for javaAddict
0
1K
Member Avatar for the_preface

I'm writing a code segment that calculates and displays the number of holes upon which a golfer made an eagle. Which is two fewer than the par value for the hole. This is what I have come up with. [CODE] int[] par = new int[18]; int[] strokes = new int[18]; …

Member Avatar for sneaker
0
142
Member Avatar for ndiiie

Hi, I am a newbie here, but I want to ask several things: 1. What is the advantage and disadvantage of using JSF than any other frameworks, such as Spring, Struts, GWT, etc? 2. Which java framework would best fit for building an airline reservation system?

Member Avatar for parry_kulk
0
80
Member Avatar for pore

Hello, I'm trying to read from the command line. There are 9 numbers and I want to store them in an array as int. I've alread the following [CODE] public static void main(String[] args) throws IOException{ String [] temp; public static void main(String[] args) throws IOException { InputStreamReader inputStream = …

Member Avatar for mdegi
1
206
Member Avatar for avinash_545

hi everyone. well I have a small problem. Actually, I have an interface (ComplexNum) and a class (ComplexNumb).The end result is to do small calculation with some complex numbers. I have already implemented the interface in the class , but eclipse keeps on telling me that I have to implement …

Member Avatar for avinash_545
0
106
Member Avatar for anthonysteven

Hi, When I tried to install Netbeans 6.1 in Vista, I get this error message: java.lang.RuntimeException: java.io.IOException: Could not get shell folder ID list Any help would be appreciated. Regards, Anthony

Member Avatar for peter_budo
0
111
Member Avatar for charlieruns

I have a gui with an ADD, EDIT, and DELETE button. All of which are not active until you click their respective name from the menu bar. Once I click on the DELETE key in the menu, it actives my delete button fine, but when I select an object from …

Member Avatar for charlieruns
0
63
Member Avatar for sharathk60

hi please help to print character form a-z and 0-9 randamly in java all the character sholud be present without repetion ie all 26+10 letter sholud print and each time it sholud print differently like First time if it print like this 0 a 2 f g t h y …

Member Avatar for sharathk60
0
384
Member Avatar for luvthug

My Printwriter method is not writing to a text file. the code runs fine it displays the text on screen but nothing appears in the text file. [CODE] public void run() throws IOException { Scanner sc = new Scanner(System.in); boolean cont = true; while (cont) { System.out.println("Enter your line text"); …

Member Avatar for charlieruns
0
175
Member Avatar for pinsickle

Hello, I am pretty new to Java so I am following along in a book to learn it. I am currently in the beginnings of making a MIDI player but I have run into to a problem. I am using a sequencer, if I don't close the sequencer the program …

Member Avatar for pinsickle
0
146
Member Avatar for jko2326

I had to convert one of my programs into an applet. And most of it I copied and pasted, but the program is suppose to let the user input a number in the texfield and when they click one of the radio button options the calculate resuls are suppose to …

Member Avatar for moutanna
0
136
Member Avatar for Siren88

Hi, I am trying to create a graphical program that visually stimulates the path of the sun over a city skyline. I've created a Time button but I don't know how to move my sun to the right each time I click on "Time". The program should works like this: …

Member Avatar for otherdummy
0
140
Member Avatar for Geodude0487

So my teacher this semester is the worst I ever had, I can not get a hold of him at all for help on these labs I've been working on them and trying to get his help on them for the past 3 weeks but since it's an online class, …

Member Avatar for Geodude0487
0
125
Member Avatar for idlackage

I'm trying to make a method that would create a new tab with a specified name and a white background. However, nothing I pass in (whether it's a JPanel, JButton, etc.) would show up in the final result. I can't tell what's wrong. [CODE]import javax.swing.JFrame; import javax.swing.JPanel; import java.awt.BorderLayout; import …

Member Avatar for idlackage
0
130
Member Avatar for kiyu2keith

Salon membership fee Male = 600 Female = 500 If Foreigner +850 n for not foreign f if foreign my code is [CODE] public static void main(String[] args) { String gender, nat; gender=JOptionPane.showInputDialog("Gender"); nat=JOptionPane.showInputDialog("Nationality"); if (gender=="m" & nat=="n"){ JOptionPane.showMessageDialog(null,"Gender:" +gender +"\nNationality"+nat+"Fee is 1450" [/CODE] This code doesn't work so I …

Member Avatar for kiyu2keith
0
109
Member Avatar for madi-lin

I am a beginner when it comes to jsp, so sorry if the code is really bad. I need to be able to convert images to and from byte[] to store and display images, but I am not sure how to do it. I have a form first for uploading …

Member Avatar for jwenting
0
889
Member Avatar for Protoroll

Okay, so I wrote a method that goes through the arraylist checks if the items has the maximum value, which is ten, and returns it in a new arraylist. I got that method to work, but I am having trouble writing the test class for it. It keeps returning false. …

Member Avatar for cale.macdonald
0
89
Member Avatar for rohit25

i want to add a button in my java program so that when i click that button pages of router\modem connected to computer is open please suggest solution

Member Avatar for cale.macdonald
0
61
Member Avatar for ceyesuma

Hello Could someone point out what I need to change in the code I have so far? I would like to use XML format in a properties file. The original .properties worked but this will not load the new formatted .properties. I have an app that loads properties in ModelUtils.java …

0
68
Member Avatar for zerioni

Okay, fairly straightforward mysql insert from a form, the insert works fine but i wanted to have it check for duplicates first and kick out an error if the name already existed in the table. That said, I worked out a few errors in the jsp, and have it down …

Member Avatar for zerioni
0
6K
Member Avatar for Heba91

Write a program which takes a single integer input "height" and displays a "pyramid" of this height made up of "*" characters on the screen. Sample Output: Pick another height (must be between 1 and 30): the triangle must be equilataural * *** ***** ******* ********* *********** *************

Member Avatar for bsewell
0
122
Member Avatar for newtojavas

Ok so I have been working on this for 12 hours straight and I cannot get it to work right to save my life. Attached is the word document of what the project is suppose to do and the file its suppose to read from. [B]ANY HELP IS GREATLY APPRECIATED …

Member Avatar for Salem
0
109
Member Avatar for theABCasian

hey guys ok so i'm stuck with a logic error this program im writing requites me to we write my own hash table when pulling a pice it seems to add an extra index some how there fore it really shows up with dates in December. thanks for any help. …

0
46
Member Avatar for jlover2010

Hi all I am aware of possibility to have an array of objects (usually Strings) as the parameter options, so we can have buttons with custom labels. Is there any easier way to just for example change the value of OK_OPTION option button label/text from "ok" to "okAy" ? Thanks …

Member Avatar for jlover2010
0
169
Member Avatar for jlover2010

Recently i needed to override dome default values of swing properties ... I got the answer currently needed.Details are located [URL="http://www.daniweb.com/forums/post1210384.html"]here[/URL] But after that i interested to find a way to have all these pairs (simply HashTable keys and values elements) to override them at the startup of applications to …

0
246
Member Avatar for david cashin

Hi, I am starting out with linkedlists and would like to know about using another class in a linkedlist. Here is what I am trying to do: [CODE]LinkedList<Student> list = new LinkedList<Student>(); list.add(new Student("Name", 92, 87, 81)); [/CODE] I have no idea what the student class would look like! Would …

Member Avatar for david cashin
0
261
Member Avatar for nickbeare

Hi, I am a JSP newb. I have been scratching my head over this for a while. My task: to construct a POST and to read the response that comes back. I have been provided with some kits that illistrate how to do the job in ASP, ASP.NET and PHP, …

Member Avatar for ~s.o.s~
0
149
Member Avatar for initialone1

hi guys, im currently working on an assignment where i have to create a secure chat room program, it works by one main chat server and then each client can log in and send messages to the server and the server will send the messages back to everyone that is …

Member Avatar for peter_budo
0
74
Member Avatar for elmisti

We have an Eclipse RCP application and in case of server disconnection we would like that the cursor changes to HOURGLASS. It works ok for a normal frame, but if a dialog is active, then in dialog the cursor remains ARROW. Any idea?

Member Avatar for elmisti
0
118
Member Avatar for shine_jose

I wish to use a function in .js file in .net using java script which have two parameters ie one getting row value and other getting column value and function should return the table is it possible I am new to java script please help me.

Member Avatar for kvprajapati
0
70
Member Avatar for vijaysdon

How can we pass the variable value from javascript to jsp page at runtime? I am getting this problem when i want to display the second drop down box according to the selected item in the first drop down. For ex: Lets consider we have a drop down field named …

Member Avatar for peter_budo
-2
2K
Member Avatar for lola_fcis

i want to know how connect a microsoft access using java and i want how to call this data base thanx:)

Member Avatar for jwenting
0
88
Member Avatar for tamagochi

Dear all I am currently trying to find a java source code with which either HTTP POST or GET request can be catch from my program, then the HTTP POST can be read to our user on my program,,,can some body help me ? Thank you in advance

Member Avatar for jwenting
0
39
Member Avatar for tyson.crouch

G'day, I've just been cleaning up some of my queries, and have opted to use a MySQL view for simplification of my queries, as i was using multiple queries to get the values that i wanted. However, I cannot quite figure out how to iterate through the view. My view …

0
58
Member Avatar for PCKing

I'm a real Noob to programming & am taking a class of intro to Java. I keep getting a variable not initializing error on the nightsA line calculation. I'm going to warn once again I'm a NOOB to this, so any help is appreciated. import java.util.Scanner; public class SunnyDaze { …

Member Avatar for masijade
0
230
Member Avatar for sharathk60

i want to display buttons like this in applet a b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 8 9 when i click to any …

Member Avatar for sharathk60
0
111
Member Avatar for mtbutt

I want to make banking system which calculates all information about bank either there is Account manegment system or any other...plzzz tel me some tricks to make this program by using simple java

Member Avatar for jwenting
0
299
Member Avatar for handrews3583

I'm working on the following assignment and could use some help: A teacher has five students who have taken four tests.The teacher uses the following grading scale to assign a letter grade to a student, based on the average of his or her four test scores: Test Score Letter Grade …

Member Avatar for otherdummy
0
3K
Member Avatar for squigworm

Hello everyone, I am having some trouble getting replaceAll(); to work. I am trying to apply it to a String array that has 4 rows and writing the portion of the code as follows [CODE] for(int i = 0; i < 4; i++){ lines[i].replaceAll("this", "that"); } [/CODE] For one reason …

Member Avatar for squigworm
0
106
Member Avatar for skyz09

Let me explain the scenario I'm in. Currently my company has a desktop set up so clients can individually log in and test our data processing software. This is currently in a linux environment for ease of management. What I'm looking to do is possibly set up a web app …

Member Avatar for jwenting
0
139
Member Avatar for FJones

I keep getting these two errors. Timing.java:45: <identifier> expected Public void double squared(double n) ^ Timing.java:54: <identifier> expected Public void double exponential(double n) I can't for the life of me figure out what I am missing. I've been away from Java for about 2 years and I was never really …

Member Avatar for FJones
0
121
Member Avatar for luvthug

Hi All, First of all Here is the question and what I have done so far. A) The helper method boolean isVowel (char c) should return true if the character it recieves is an uppercase or lowercase English vowel. For Our purposes, Vowels are the letters a, e, i, o, …

Member Avatar for javaAddict
0
173
Member Avatar for neo_philiac

I have a quick question: I have two classes. MainPanel and SubPanel I am putting SubPanel inside the MainPanel dynamically. So I have a method inside SubPanel called (toggleSection). All I am trying to do is that, in the MainPanel I am rearranging the components (all JPanels - instance of …

Member Avatar for joker400
0
81
Member Avatar for laveena

hi, I want a code for opening a particular folder on button click. I'm developing an file searching application for linux which gives result in jtable. I want to open the containing folder of selected file I able to retrive the parent folder path from jtable. I just want to …

Member Avatar for javaAddict
0
88
Member Avatar for veroniclake

hi, i am compiling a pattern like this Pattern.compile("<.*?>"); my data is like this <sra<pur>kru> when i find the group that i get is <sra<pur> how to get <sra<pur>kru> and how to get <pur>. [how to get nested groups]

Member Avatar for joker400
0
97

The End.