32,199 Topics

Member Avatar for
Member Avatar for yesha27

here I have code in python and now I want to transfer it in Java. import logging import urllib import re from waveapi import events from waveapi import model from waveapi import robot from waveapi import document from django.utils import simplejson from google.appengine.api import urlfetch def OnDocChanged(properties, context): #Get Contents …

Member Avatar for jcao219
0
183
Member Avatar for bsewell

Hi all, I'm writing a card game but I can't seem to set the cards in the deck. I'm getting a runtime exception error, whether I first try to set the suit or the rank. Here's my code: Card.java [CODE]public class Card { private String suit; private int rank; Card() …

Member Avatar for armsracer
0
126
Member Avatar for sambaby

I have a small desktop application created, i wan to create a login function for this. i have a database using MySQL which stores user name and password. i wan to know how to compare the user name and password entered in the text field with the data in the …

Member Avatar for cale.macdonald
0
123
Member Avatar for praneshss

Hi all, I'm basic programmer of Java..I tried to use JFormattedTextField for the first time.. It's giving error in importing sentence only.. I hav written import javax.swing.JFormattedTextField; It shows error "Cannot resolve symbol class FormattedTextField" I don't know what the problem is..Everything seems right..Please help me..

Member Avatar for praneshss
0
54
Member Avatar for paradiseis

Write an addressBook class that manages a collection of Person objects,An addressBook object will allow the programmer to add,delete,or search for a Person object in the addressBook. code: import java util.*; class AdressBook{ private String person,inputstr; private int age; char gender; Person Bob; Bob=new Person(); for (int i=2;i<names.length-1;i++) names[i]=names[i+1]; for …

Member Avatar for kvass
1
93
Member Avatar for zyaday

[CODE] public class TryCatchTest { public static void MyNumber(String x) throws TryCatchException1{ try{ String y = x.substring(0,200); }catch(TryCatchException1 e){ System.out.println("BBBBB"); System.out.println(e.getMessage()); // e.printStackTrace(); }catch(java.lang.StringIndexOutOfBoundsException e){ System.out.println("AAAAAAA"); e.printStackTrace(); e.getMessage(); } } } class TryCatchException1 extends java.lang.StringIndexOutOfBoundsException{ TryCatchException1(){ super(); } TryCatchException1(String msg){ super(msg); } }[/CODE] why is my exception not caught on …

Member Avatar for BestJewSinceJC
0
111
Member Avatar for Akatosh

Ok following the suggestion from another user I have switched over to a GroupBagLayout. Following the java tutorial in hindsight this seems easier. But alas, I have ran into a problem which does not make any sense to me. See screenshot: [url]http://img189.imageshack.us/img189/1060/groupbaglayout.png[/url] I have started from a top down approach …

Member Avatar for Akatosh
0
102
Member Avatar for vasunttfshimoga

Hi, I want to connect the jasper report with netbeans...........If any know please reply..............thanks in advance.

Member Avatar for peter_budo
0
64
Member Avatar for kut KK

hello guys... can you help me to find coding for grading system for my new assingment...( grade n grade point) grade A= 4.00 A- = 3.70 B+ = 3.50 B = 3.00 B- = 2.67 C+ =2.50 C = 2.00 C- = 1.67 D+ = 1.33 D = 1.00 E …

Member Avatar for Nick Evan
0
127
Member Avatar for bokz06

i think i have converted my application to an applet..... it use to read lines from a .txt file i have on my hard drive but now i want it to read a .txt file from a URL: [CODE]import java.awt.*; import java.awt.event.*; import javax.swing.JButton.*; import javax.swing.event.ListSelectionEvent; import java.net.*; import java.io.*; …

Member Avatar for HoRn
0
169
Member Avatar for Akatosh

Alright I'm trying to design a GroupLayout but running into troubles and lots of confusion...I have read the java tutorial on them and I'm still at a lost. Here is a makeshift design I painted: [url]http://img268.imageshack.us/img268/2757/grouplayout.png[/url] The thing that is stumping me is how do I go about stretching the …

Member Avatar for Akatosh
0
91
Member Avatar for senormateo2011

Hi everyone. I am new to this website and I could use some major help. Basically, I am taking AP Computer Science and my teacher has no idea what he is doing. The school thinks that since he can do web design and adobe teaching, he can do java programming. …

Member Avatar for senormateo2011
0
737
Member Avatar for javarook

I need to find the smallest index in an array, my math must be wrong because i am finding the smallest number not the smallest index. can someone check my smallestIndex method and give me some help? for example: if i put in these four numbers, 2 3 0 1, …

Member Avatar for kvass
0
3K
Member Avatar for jrlynch1

Hello all! I'm working on setting up a program to go about some files in a directory, do with them what I need, then delete. So, I started with the unfamiliar part for me, as the rest I am sure will be easy as pie. I tried to just write …

Member Avatar for jrlynch1
0
84
Member Avatar for syedaamiruddin

plz help me with code import java.io.*; public class FreqOrder { String[] word=new String[30]; int chars[]; public static void main(String... ar){ FreqOrder fc=new FreqOrder(); try{ fc.getWords();}catch(IOException e){} } public void getWords() throws IOException{ FileInputStream fin=new FileInputStream("abc.txt"); StreamTokenizer st=new StreamTokenizer(fin); st.eolIsSignificant(true); st.wordChars(33,255); st.whitespaceChars(0,32); int i=0; int nooftoken=0,tokenno=0; while(st.nextToken()!=st.TT_EOF) { switch(st.ttype){ case …

0
28
Member Avatar for cool_jatish

Hi Everybody............ M programming in JAVA............... I want to display text in JTextArea .... The text to be displayed is [TEX]Unicode words[/TEX] which are stored in the MS Access Database in table and my applet is linked with MSAccess using DSNLess connection.... Any can tell me how to get Unicode …

0
62
Member Avatar for uptheirons1

Okay, I have read through all of the average grade java swing threads I could find on this site, but I can't seem to fix this problem. Everything seems to work correctly, but the average grade won't display in the JTextPane. I am going to get rid of the extra …

Member Avatar for uptheirons1
0
531
Member Avatar for Riddlekid

I got a project, it want us create a application that can keep track of your collection of DVD and allows a user add a new DVD to the collection. The DVD information contain Title, Category, Year and Rating. In this application must use list (ArrayList or Vector or LinkedList) …

Member Avatar for javaAddict
0
87
Member Avatar for doha786

hi, first time i am using 2D array, so not much familiar with this(just learning). below, in my program trying to return the values of 2D array that i m calling from different class and showing in JTable. its working but when i am using condition then getting some null/emty …

0
65
Member Avatar for piyushsl

hey guys very sorry for creating a new thread here but i couldn't find my queries in available threads I just want to connect the java applets with mySQL database, so that the project i am working on, should move forward. Any suggestion would be thankful. The code specs would …

Member Avatar for jwenting
0
122
Member Avatar for bufospro

Hi, I am trying to learn exceptions using "throws". So , my code is [CODE]public class A { public static void main(String args[]) { A a = new A(); int x1; int x2; x1 = 7; x2 = 0; a.printer(x1, x2); } void printer(int x1, int x2) throws ArithmeticException{ System.out.println("Add: …

Member Avatar for bufospro
0
139
Member Avatar for Avasulthiris

Hi there, I did not see an Android thread, but its pretty much an extension of J2SE so this is probably the best place for it.. I'm currently developing on minimum sdk version 3 (Android 1.5 - cupcake) and I'm having a strange unexplained issue that I have not been …

Member Avatar for peter_budo
0
170
Member Avatar for zyaday

[CODE]public class Employee { private String name; private String SSN; private Employee e = new Employee("ME","MYSSN"); Driver x = new Driver(32); public Employee(){ } public Employee(Employee e){ this(e.name,e.SSN); } public Employee(String name, String SSN){ this.name = name; this.SSN = SSN; } public static void main(String [] args){ Employee e = …

Member Avatar for zyaday
0
119
Member Avatar for esy928

Good Day! I'm a little bit lost right now on how to implement trees in java. We were ask to do a program that will display relationships (1st/2nd degree friends). I'm thinking of using vectors but our teacher said that we have to use Abstract Data Types (Trees). I've tried …

Member Avatar for jwenting
0
126
Member Avatar for jafman

write a program using 'for' loop to display the following pattern, where '*' is displayed at a time

Member Avatar for masijade
-1
37
Member Avatar for justinlee23

my program seems to run fine the first time i run it, but when the JOptionPane box shows up at the end asking if id like to run it again it seems to restart my balance to the initial amount rather than keep it and continue subtracting or adding [CODE] …

Member Avatar for javaAddict
0
127
Member Avatar for QueenofSheba

Is it necessary to archive ALL of the updates received from Microsoft and Java? Doesn't each subsequent update negate the previous one?

Member Avatar for masijade
0
38
Member Avatar for pirateninja1111

here are the instructions for my assignment Write a program that counts the number of words, lines and total characters (not including whitespace) in a paper, assuming that consecutive words are separated either by white space or end-of-line characters. Your output from this particular file should say: line count: 58 …

Member Avatar for james.newell
0
452
Member Avatar for pn2bade

So I need to make this program that Reads a file with a scanner, inserts each key and value into a hashmap, and when the user types in one of those keys, it will print both the key and the value. If it has no value, it says so, and …

Member Avatar for james.newell
0
96
Member Avatar for fuggles

It compiles without any errors in Eclipse, and when I comment it out, the application does not crash, but somewhere in here it is making my application crash on startup. Does anyone know how to fix this problem? [code=Java] Button send_button = (Button)findViewById(R.id.SendButton); spam_button.setOnClickListener((OnClickListener) this); phone_number = (TextView)findViewById(R.id.ph_num); txt_body = …

Member Avatar for fuggles
0
83

The End.