36,051 Topics

Member Avatar for
Member Avatar for Web_Sailor

Hi. I have a constructor like below whose class extends JFrame. The problem is that my for loop is printing only the last string.( I am using this information ultimately to build a JButton table). Can somebody tell me whats wrong with this ? Below is the code:- [CODE] public …

Member Avatar for masijade
0
104
Member Avatar for jeffreyjs

Hi, I am currently developing a cafe ordering and payment system which i encounter some calculation issue... i need a formula which is able to calculate the total price in this scenario, If Customer A order 5 items of different prices and Customer B order 9 items of different price, …

Member Avatar for Jaiam
0
182
Member Avatar for freelancelote

I'd appreciate if somebody could have a look at this code and tell me where the problem is. The program is meant to take a .txt file and split it in three different files: one with words of 1 to 4 letters, one with words of 5 to 7 and …

Member Avatar for Agni
0
2K
Member Avatar for saraguna

function validate1(){ if(document.all.doc1.value == ""){ alert('Please select 1st Docoment !!'); document.all.doc1.focus(); document.all.doc2.value = ""; } var doc1 = eval(document.all.doc1.value); var doc2 = eval(document.all.doc2.value); if(doc2 < doc1){ alert('First Document number must greater than secondnd Document number!!'); document.all.doc1.focus(); document.all.doc2.value = ""; } the script above used to compare string between combo box …

Member Avatar for javaAddict
0
175
Member Avatar for isuruj

I need to copy a file to my machine from a remote machine. Are there any ant targets to do that?

Member Avatar for isuruj
-1
115
Member Avatar for ikea12121

Hi all! Just a brief question. How would i go about adding say the first 5 numbers in an array of 12 preset values? Thanks :)

Member Avatar for peter_budo
0
43
Member Avatar for SQ89

I have two files of huge data contains string and integers and i want to read from it and use it to count characters of the string for example name ending with letter "A" containing "oo" or having letter "A" as seconf letter. i need some methods from the String …

Member Avatar for SQ89
0
145
Member Avatar for neelamdwivedi

hello friends i m working on a project wherein we have to capture a photo using web cam for the web application.. can anybody tell me how we can do this. i have read many artical and found a code for the stand alone appli. from "http://www.mutong.com/fischer/java/usbcam/" but it is …

Member Avatar for neelamdwivedi
0
120
Member Avatar for TigerGirl

So, I have to write a public static method add, which takes a parameter, and adds up all the values in the N-ary tree it represents. Characterize the traversal order: preorder. - what does that mean???? So, can someone explain to me how I would do this??? thanks.

Member Avatar for kvprajapati
0
74
Member Avatar for Hooda diya

i want to send sms from my java application to mobiles and also email from my java application

Member Avatar for kvprajapati
0
54
Member Avatar for kathmartir

I have a problem with the dispose method. . .I got 3 java files with a class name: MainProgram.java MainPanel.java PageOne.java The MainProgram java extends JFrame. The MainPanel.java extends JPanel. The PageOne.java extends JFrame. The MainPanel.java is where all the actions and etc. are being set. The MainProgram.java calls the …

Member Avatar for FriQenstein
0
5K
Member Avatar for ki72

For example I ask the user to enter a 4 digits integer number. For example the user enter 4875. I want to display odd digits (7 5) and even digits (4 8). By Extract each digit of the number using integer division and store the results in separate variables. for …

Member Avatar for Grn Xtrm
0
116
Member Avatar for JavaCode

OK I'm making a script and I get this error and have no clue off have to fix heres the code all help is thanked: [CODE]import java.awt.*; import java.util.*; import java.util.List; import java.util.logging.Level; import javax.accessibility.*; import javax.swing.*; import org.rsbot.bot.Bot; import org.rsbot.script.*; import org.rsbot.script.wrappers.*; import org.rsbot.accessors.*; import org.rsbot.event.listeners.PaintListener; import org.rsbot.event.listeners.ServerMessageListener; import …

Member Avatar for kekkaishi
0
175
Member Avatar for ki72

Java Code I don't know how to show odd or even digits from an integer number. For example I ask the user to enter a 4 digits integer number. For example the user enter 4875. I want to display odd digits (7 5) and even digits (4 8). By Extract …

Member Avatar for peter_budo
0
155
Member Avatar for ceng_angel

hi, i want to do a web downloader, but i don't know where i should begin from? Could you help me, please?

Member Avatar for ceng_angel
0
41
Member Avatar for siti hani

Hi everyone. how to check precise UML activity diagram in java need solution asap

0
43
Member Avatar for rjay_lolerzz

import java.io.*; import javax.swing.*; class GS { static public void main(String[]args) throws Exception{ double q, q1, q2, q3, q4, q5, q6, q7, q8, q9, q10, q11, x, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, quotient, quotient1, quotient2, quotient3, quotient4, quotient5, sum, sum1, sum3; System.out.println("PRELIM LEC"); { …

Member Avatar for peter_budo
0
245
Member Avatar for shroomiin

Hey everyone. I am supposed to create a program that will input the miles driven and gallons used for each tank full of gas. program has to calculate and display the miler per gallon obtained for each tankful and print the combined miles per gallon for all tank fulls up …

Member Avatar for Mikeyp926
0
182
Member Avatar for sravan953

This code snippet allows you to know whether a word/sentence you have entered is a 'Magic Word' or not. A 'Magic Word' is a word which has at any position two consecutive letters. This can be achieved by taking the ASCII values of the characters. For example, if I enter …

Member Avatar for rnthelord.2008
0
6K
Member Avatar for vampshay

can u help me how to connect to MS Access database using java codes?? import java.applet.Applet; import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.lang.StringBuffer; import java.io.IOException; import java.io.*; import java.sql.*; public class sample1 extends JFrame { private DataPanel myDataPanel; private Connection dbconn; private static int numPeople=0; private static String info; …

Member Avatar for masijade
0
123
Member Avatar for xonxon

[code] import java.util.*; public class course { static Scanner sc=new Scanner(System.in); public static void main(String[]args) { String name,students,addStudent; int numberOfStudents; String courseName,getName,getStudents; int getnumberOfStudents; Course course1=new Course("C++"); Course course2=new Course("Java"); course1.addStudent("Peter"); course1.addStudent("Brian"); course1.addStudent("Anne"); course2.addStudent("Peter"); course1.addStudent("Steve"); System.out.println("Num of student in course1:"+course1.getnumberOfStudents()); String[]students=course1.getStudents(); for (int i = 0; i < course1.getNumberOfStudents(); i++) …

Member Avatar for Grn Xtrm
0
108
Member Avatar for xonxon

[code] this is the simple program that i write import javax.swing.JLabel; import javax.swing.JTextField; import javax.swing.JFrame; import java.awt.FlowLayout; public class ShowFlowLayout extends JFrame { public ShowFlowLayout() { setLayout(new FlowLayout(FlowLayout.LEFT,10,20)); add(new JLabel("firstname")); add(new JTextField(10)); add(new JLabel("MI")); add(new JTextField(10)); add(new JLabel("Lastname")); } public static void main(String[] args) { JFrame frame=new JFrame("ShowFlowLayout"); frame.setSize(400,500); frame.setLocationRelativeTo(null); …

Member Avatar for xonxon
0
106
Member Avatar for swapna7999
Member Avatar for neelamdwivedi
0
289
Member Avatar for Tenchi

Hi all, I'm new here, and am currently taking an introductory programming course taught with Java 5. I really hate to come here, and bother people with my homework, but I really don't have anywhere else to turn at the moment. I have a couple of quick questions about some …

Member Avatar for ithelp
0
316
Member Avatar for Web_Sailor

Hi.. I am trying to load a text file into JTable. The file is tab delimited. I want to achieve the following things:- 1) Show the first line of headers on the left hand side. 2) Show my buttons on the right hand side of the JTable. The problem is …

-1
64
Member Avatar for redlyfs

import java.util.Scanner; public class BookRentalSystem { public static void main(String args[]) { //Declaration of variable and instances String bTitle, bType, bAuthor, bISBN, bStatus, search; int choice = 1; int bCount = 0; boolean found; Scanner input = new Scanner(System.in); Book[] books = new Book[5]; //Executing user's selection from menu. Exit …

Member Avatar for redlyfs
0
222
Member Avatar for why1991

I must be overlooking something simple here, but I have no clue why it says that it is going out of bounds. Here is my entire program... [CODE]import java.util.Scanner; import java.util.Random; public class MadLib { static Scanner input = new Scanner(System.in); static Random rng = new Random(); static String t[] …

Member Avatar for BestJewSinceJC
0
195
Member Avatar for dhanh90

I have this code: [CODE]/* package lab; public class Main { public static void main(String[] args) { int t=0; int h=0; int w=0; String Name="http://hcmiu.edu.vn/mail/cuem"; char[] ch=new char[Name.length()]; for(int i=0;i<Name.length();i++){ ch[i]=Name.charAt(i); for(int j=0;j<Name.length();j++){ if((ch[j]=='/')&&(ch[j+1]=='/')&&(Character.isLetter(ch[j+2]))){ t=j+2; System.out.println(t); h=Name.indexOf('/', j+3); } } } System.out.println(Name.subSequence(t, h)); } } [/CODE] This code run correctly.But …

Member Avatar for dhanh90
0
166
Member Avatar for gibson.nathan

this is my first program using more than one method. while i like it because of its modularity and cleanness, i despise it for its multiple new problems it introduces into my world where i was just getting the hang of the old style. i am supposed to be doing …

Member Avatar for ieshoes
0
192
Member Avatar for GooeyG

[B]Here is the problem:[/B]There are (at least) two ways in which you can make a 12 hour clock. One possibility is to just store hour values from 1 to 12. On the other hand, you can just leave the clock to work internally as a 24 hour clock, but change …

Member Avatar for darkagn
0
470
Member Avatar for intet

the final test given to me by our professor is that display a JTable with 5 names in it no nid to input

Member Avatar for darkagn
0
37
Member Avatar for jen140

Hello all. I have a small problem, i need to recieve a 8 digit number for example: 12345678 87654321 and so on. After i need to devide the value and use the int as a array, something like int i=123; System.out.println(i[1]); It should return 2 (therocially), but obviously the doesnt …

Member Avatar for jen140
0
406
Member Avatar for Alex_is

write a program which asks the user how many days they will be working. then using your program calculate and print the amount of money they will earn if paid £1 for day 1, £3 for day 2, £9 for day 3 etc.....i have coded the inputing of name and …

Member Avatar for BestJewSinceJC
0
94
Member Avatar for senthil12345

[code] import com.sun.crypto.provider.RSACipher; import java.util.Random; public class RandomRange { static int START = 1; static int END; static Random random = new Random(); private static void showRandomInteger(int aStart, int aEnd, Random aRandom){ if ( aStart > aEnd ) { throw new IllegalArgumentException("Start cannot exceed End."); } //get the range, casting …

Member Avatar for BestJewSinceJC
0
129
Member Avatar for kekkaishi

Hi, ive been trying to assign a value to a variable from within the ActionPerformed method, but the value seems to be lost as soon as ActionPerformed method ends. here's the code [CODE] public class Log{ private JTextField user = new JTextField(10); private JPasswordField pass = new JPasswordField(10); private int …

Member Avatar for kekkaishi
0
1K
Member Avatar for GooeyG

[B]Here is the problem[/B]:Change the clock from a 24 hour clock to a 12 hour clock. Be careful: this is not as easy as it might at first seem. In a 12 hour clock the hours after midnight and after noon are not shown as 00:30, but as 12:30. Thus …

0
66
Member Avatar for eggmatters

Hello all, I am writing a java application where I have a Jtable with checkboxes next to the data. If the user checks a box, I want to store a specific value from the data table. I can do this inelegantly by setting setCellSelectionEnabled(true) and adding the following to the …

Member Avatar for eggmatters
0
142
Member Avatar for llemes4011

Hello. I'm trying to write a program that registers Mouse Clicks that occur on the System, not just in a JFrame. Does java6's desktop integration allow this sort of thing? or would I have to use JNI to listen for Mouse clicks and Key Pressed?

0
70
Member Avatar for ahmed_2003

The code will be able to detect the face from webcame then determine weather it's in any situation relay under sad,happy ,...etc then play music file according to the situation.[code]Hello every body,I'm doing Project on Face detection situation,weather if it indicate happy ,sad....etc situation.So the problem is there is many …

Member Avatar for BestJewSinceJC
-3
68
Member Avatar for trojanGirl

hi all, i am in an urgent requirement of getting the WAN ip of the visitors of my website through java. using getRemoteHost() gives me the lan ip. please respond

0
62
Member Avatar for ki72

if and if-else statement: you will have to write a program that reads a 4-digit positive integer from the user and prints out the following information on the screen: 1. Whether the positive integer is an odd or even number 2. (display) The odd digits of the integer 3. (display) …

Member Avatar for freesoft_2000
0
103
Member Avatar for ITleb

Hi, I have to develop a software and it should run on windows, mac and linux, so i was thinking of developing it in java using netbeans :-/ I have windows OS, would the jar file generated in windows run properly on mac and linux? and is there any specific …

Member Avatar for BestJewSinceJC
0
232
Member Avatar for whoadiz

Hey there everyone, first post here so please excuse any mistakes :) Ok so I have this assignment here: Suppose the weekly hours for all employees are stored in a two dimensional array. Each row records an employee's seven-day works hours with seven columns. For example, the following array stores …

Member Avatar for BestJewSinceJC
0
260
Member Avatar for habibur

Hi all, I have a C program namely NetLibExample.c.I have compiled it to get a NetLibexample executable in RHEL5. It is successfully running from the terminal itself by the syntax: ./NetLibExample I have written a shell script to call the same.The shell script is test.sh **test.sh** cd /working/AVClient mkdir habib_test …

Member Avatar for freesoft_2000
0
268
Member Avatar for Xessa

I want to write this. [b]Last[/b] night i dreamt of [b]San Pedro[/b]. How can I write this with 1 PdfPCell

Member Avatar for quuba
0
110
Member Avatar for sbmahire

hi friend i wish to store mp3 files in postgresql database i want to store this for my project i am using java as front end and mp3 files as backend

Member Avatar for quuba
0
32
Member Avatar for akshaymirji

I have used org.apache.commons.httpclient.HttpClient for the first one and org.apache.http.impl.client.DefaultHttpClient for the second. for both codes i'm getting response codes 200 ok. it is happening even when i remove username n pwd fields. So i'm not logging in...[code]1) HttpClient client = new HttpClient(); GetMethod get = new GetMethod("https://control.akamai.com"); System.out.println(client.executeMethod(get)); System.out.println("now …

-2
66
Member Avatar for shashikant.v

hi. i want to call a new frame on clicking on treeview . pls help. thanks

Member Avatar for quuba
0
64
Member Avatar for The Photographe

I am having some problems with (a)coloring my stick figer(b)to stabelise the line on which the stick fig is supposed to be running across the Applet on. Can some one please advise me on how to achive this? Thanking you in advance. [CODE] //Walking //Written By: //Written on: import java.applet.*; …

0
76
Member Avatar for Xessa

Hello I have a csv file and i want to read data from it and pass the data to the database. Now. I have values that are seperated with semicolons. The file is like this. customerID;name;surname;phoneNumber 1;Gokhan;Terzioglu;333444333 2;Melih;Terzioglu;555444333 There are 100.000 columns like this. How can I read the data …

Member Avatar for parry_kulk
0
107

The End.