36,051 Topics

Member Avatar for
Member Avatar for ippomarley

hi guys, I am having trouble with this code, cause i get an infinite loop. I made nexTxtFile the variable name of the txt file i am creating and writing text to. i want to be able to get user input untill the user does not want to enter anymore …

Member Avatar for verruckt24
0
112
Member Avatar for aodpreacher

I have a Class and then a made a sub class that would check if the letter "a" is in the string. i don't know how to call the subclass i made. i want to insert the subclass object into a StringDetail array but i keep getting an error. i …

Member Avatar for aodpreacher
0
155
Member Avatar for doha786

in C language i learned Precision paramater to show how many decimal point to print... in java how to do this precision for double, float etc....................

Member Avatar for VernonDozier
0
87
Member Avatar for easytrucker45

I am having problems getting my program to compile and run. Newbie from the word go. The main problem is I have all of the code but I cannot make the other classes go with the main class. Any help would be great. Here is the code that I have …

Member Avatar for easytrucker45
0
253
Member Avatar for linhngoc2100

I have a homework that only uses loops and selections. I do not know how to do it. Here is the topic: Write a program that prompts the user to enter the number of students and each student's name, score. Finally, display two students have the highest scores. Thank you.

Member Avatar for GDICommander
0
107
Member Avatar for vidaj

Hello I'm building my own html parser in python, and have ran into some problems. First off, I'm using python 3, so I can't use the old bundled sgmlparser, or beautiful soup and could not find windows binaries for lxml, so I'm rolling my own. It is for my master …

Member Avatar for vidaj
0
1K
Member Avatar for becdudek

hey i am meant to write a method to display a number of prime numbers specified by the user. here's my code and i know its prob all wrong and there are much easier ways to do it but i just wanna know what to do to make it compile …

Member Avatar for rahul8590
0
157
Member Avatar for joshmo

I have two .java files and I want to access a variable of a method in one of the files and use it in another. However, I dont want to call the whole method and I dont want the method to return a value...I'll try to illustrate below [code=java] [COLOR="Red"]//file_A.java[/COLOR] …

Member Avatar for javaAddict
0
3K
Member Avatar for king_786

hello i am stuk on this piece of work which i have no understaning at all!!! this is the question could someone please show me or give me gudlines in how to do it!!! Write a Java application that asks a user for their name and displays it in a …

Member Avatar for javaAddict
0
187
Member Avatar for king_786

Write a Java application that helps a programmer check that the name to be used for a variable is syntactically correct. The rule for a valid Java name (called an identifier and is described on page 35 of the textbook) is a sequence of letters, digits, underscores (_) and dollar …

Member Avatar for bluesea50
0
116
Member Avatar for naash

In my attachment there is one jsp page and 3 java programs - DBconnection, servlet and DBInterFace. In the jsp page the names from the server has to be displayed. Of course I cannot attach the database but there is something wrong in coding either in the servlet & interface …

0
49
Member Avatar for mnieber

Hi, can anybody tell me why finalize is not called in this example? I expect finalize to get called and write the file "final.txt". I do see this file if I call finalize explicitly (see commented out line in main). A Java VM will be started and stopped when I …

Member Avatar for Ezzaral
0
128
Member Avatar for TriniBabe

Hi i am new to Java and i hav a program to do where i am given an interface with all its methods in it then i am given a class that implements the interface but also has some of its own methods. But a method in the interface is …

Member Avatar for Ezzaral
0
76
Member Avatar for Superstar288

hello everyone, i was just wondering for people who have used db4o before is there anywhere that i can do a query to get the most popular cinema show, and a query to get total money made for each show??? just wondering if i can i have never done Queries …

0
91
Member Avatar for custurd12

Create a class called Factor that has a public method called calculateFactor. The method has two two arguments of type integer and checks whether the smaller of the two integers is a factor of the larger of the two integers. The method will return a factor or a zero. Write …

Member Avatar for VernonDozier
0
159
Member Avatar for king_786

Write a Java application to print out the numbers 10 through 49 in the following manner: 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 …

Member Avatar for peter_budo
0
6K
Member Avatar for asd32

Hello, As you can see the title, i need help with the loop. Here is the code: [code] double t; for(t=0.5;t>2.5;t=t+0.1){ System.out.println(form.format(t)); } [/code] As you can see, the loop keeps going from 0.5 to 2.5. The main problem, that i cant understand how to make it count from 0.5 …

Member Avatar for Ezzaral
0
131
Member Avatar for JooClops

Hi! We have a project,to make a website in school, so one of the mandatory things is the registration form. so i can just copy from the example the teacher gave us and add some stuff, but i wanted to practice checking the form, and one of my "missions"(huh i …

Member Avatar for JooClops
0
123
Member Avatar for itslucky

Hi, Dear Friends i want to Pass AT Command to Mobile phone through Hyperterminal (Windows XP) from Java Application... The Hyperterminal passes the AT Commands to the phone, but i want to develop a java application, which pass the AT commands to the phone through Hyperterminal. please tell me how …

Member Avatar for JamesCherrill
0
120
Member Avatar for doha786

As a newbie i m facing a small prob right now... i have code to search names from many files and compare the results with similarity scoring. its working but when the names found my program should show the filepath or fileName for each names. how can i do this …

Member Avatar for BestJewSinceJC
0
99
Member Avatar for Hockeyfreak889

ok the other day i posted about how to actually display an image and then what the best way would be to read in a location of an image and then display it. Now my new question is how do you resize an image. At the moment the image i …

Member Avatar for JamesCherrill
0
285
Member Avatar for rpjanaka

hi im janaka i tried to do the unit testing with JBuilder. download and install Junit set the class path. but according to the readme file, i was unable to test my installation. these are that instructions. [COLOR=DarkRed] add[B]junit-4.1.jar[/B] to the CLASSPATH. For example: set classpath=%classpath%;INSTALL_DIR\junit-4.1.jar;INSTALL_DIR test the installation by …

Member Avatar for sadz2k9
0
211
Member Avatar for king_786

hello i am stuk on this piece of work which i have no understaning at all!!! this is the question could someone please show me or give me gudlines in how to do it!!! Write a Java application that asks a user for their name and displays it in a …

Member Avatar for deathwishgenius
0
189
Member Avatar for Grub

Hi. I am writing a mac program that among other things, allows a user to create unix links to files. Now I am using the runtime.exec() method to run the ls -s command e.g. ls -s dir1/fileName dir2/NewfileName This works but becomes difficult if the path name to the file …

Member Avatar for JamesCherrill
0
152
Member Avatar for deathwishgenius

Ok, this is my second post...i will answer four with this rturn... wtf is with the the compiler not knowing I am making a variable known as the type I write?.. ((String)(Vector)(((Vector)((Vector)DesktopFrame.desktop.masterPane.iconPane.logoffFrame.secretData.uberSecretData.elementAt(1)).elementAt(ind + 1)).elementAt(2))) = label. Yes, Im a wannabeEverything...4 post ansers if I get One :) death

Member Avatar for JamesCherrill
0
106
Member Avatar for dep.new

hello, could u pls tell me if there's any function which can allow java to decide what operator should use in order to return a min/max number? if yes.. i'd be happy to see it. i once saw something like this: [I]use "+,-,/" [/I].. followed by i don't know what.. …

Member Avatar for javaAddict
0
299
Member Avatar for K?!

Hi all Is there any class to store time in easily, without having to store a date too? We have to create a program for swimming competitions. The swimmers in a match need a time (the time they did swimming the match). So we only need hours, minutes, seconds and …

Member Avatar for K?!
0
102
Member Avatar for k2cool_87

i have a jsp page which initializes itself from a database...it has a series of checkboxes that are being created from the database values...now once the user selects the boxes required by him i have designed a function dat reads the values from the checked fields n stores them in …

Member Avatar for k2cool_87
0
132
Member Avatar for VernonDozier

This isn't a programming how-to thread, but I've written a large graphics manipulation program in Java and I am developing a help section that explains how to use the program, a step by step tutorial for how to use all the features. I figure a good way for me to …

Member Avatar for Inverse
0
97
Member Avatar for aixing

Hello, I want to link this JSP page to another JSP page. But it keeps coming back to the same page even though I've response.sendRedirect to another page. I'm new to JSP so I really have no idea what to do now.. Here are the codes below. [CODE] <!DOCTYPE html …

Member Avatar for javaAddict
0
90
Member Avatar for curtissumpter

[code=java] class ListToolsFrame extends JInternalFrame { JLabel titleLabel; JButton exitButton; JTextArea outputArea; RandomAccessFile rafFile; ListToolsFrame(RandomAccessFile raf) { StringBuffer buf2; rafFile = raf; try { rafFile.seek(0); } catch (IOException e1) { System.err.println("rafFile.seek(0)"); } JPanel jp = new JPanel(new BorderLayout()); buf2 = listTools(); titleLabel = new JLabel("List Of Tools"); exitButton = new …

Member Avatar for curtissumpter
0
586
Member Avatar for Prabakar

Hi everyone, I am a little new to Java programming and am doing a simple project. The Problem is that I am able to connect but am not able to send any data. It is a little weird. The server gets the client's IP and the client to is connecting …

Member Avatar for Prabakar
0
99
Member Avatar for curtissumpter

Hey, Any suggestions on how to stop a IOException: Negative Seek Offset problem? -- Curtis

Member Avatar for stephen84s
0
48
Member Avatar for keofua

Hi, I'm doing a program that sends and receives message using SIP. I want to generate key pair for this program as i need the key pair to create certificates. I'm able to found key pair generation codes, but however when i call the key pair generated into the MIDlet, …

Member Avatar for keofua
0
94
Member Avatar for Hockeyfreak889

I recently started learning java and am trying to make a simple GUI program that takes in a location of an image and then displays the it. What would be the best way to do this??

Member Avatar for Hockeyfreak889
0
100
Member Avatar for k2k

Okay, I basically have a menu bar with menuItems.. say just showTableMenuItem --> to display the table .... and addMenuItem() --> to add new record. I want to be able to display the table (when user clicks on the button), and then disappear the table and display the addMenu page(when …

Member Avatar for k2k
0
127
Member Avatar for curtissumpter

Hi Guys (and Girls), Problem: Negative seek offset with respect to a RandomAccessFile's seek method. [code=java] private void writeRecord() { String v[] = inputUI.getValues(); raR = new RaRecord(Integer.parseInt(v[GeneralUI.RECORD]), v[GeneralUI.TOOLNAME], Integer.parseInt(v[GeneralUI.QUANTITY]), Double.parseDouble(v[GeneralUI.COST])); try { file.seek(raR.getRecordNumber()-1 * RaRecord.size()); } catch (IOException e1) { e1.printStackTrace(); } try { raR.write(file); } catch (IOException e) …

0
89
Member Avatar for llemes4011

Hi, I'm attempting to program a fire emblem/final fantasy tactics sort of game. I'm having trouble getting the movement range to layout correctly. The way I'm doing it works, but most of the time gets stuck in an infinite loop, and doesn't always show all of the possible movement/attack locations. …

Member Avatar for llemes4011
0
100
Member Avatar for BestJewSinceJC

I was doing a bit of reading, and according to what I read, GUIs can be set up and realized in any thread, but doing more GUI work in a normal thread (non-EDT) after a call to setVisible can be dangerous. The explanation given is as follows: [QUOTE]The example constructs …

Member Avatar for BestJewSinceJC
0
103
Member Avatar for kakakon

Hello, I need to read an xml file and store the information from it, into a tree struct in java. The xml format is the following: <room> <floor> <shape>...</shape> <dimensions>...</dimensions> <orientation>...</orientation> <style>...</style> <other tags>...</other tags> </floor> <ceiling> <shape>...</shape> <dimensions>...</dimensions> <orientation>...</orientation> <style>...</style> <other tags>...</other tags> </ceiling> <wall> <shape>...</shape> <dimensions>...</dimensions> <orientation>...</orientation> <style>...</style> …

Member Avatar for Ezzaral
0
67
Member Avatar for DanielB2

Hi all, I have created a Backgammon AI player in Java, and I would like to know if anyone knows how I can play my player vs GNU Backgammon in order to test how well it does. Thanks

Member Avatar for BestJewSinceJC
0
78
Member Avatar for doha786

i have GUI class named 'myGUI' where contains textField, button, textArea and so on.... the code like this: [CODE] p2.add(c=new Label("Type name to search:")); p2.add(m=new TextField(10)); p2.add(b=new Button ("SEARCH")); b.addActionListener(this); p.add(k= new Label("CLICK SEARCH TO START ACTION") p1.add(t=new TextArea(""), BorderLayout.CENTER); [/CODE] i have another class file named 'searchCompare' where user …

Member Avatar for doha786
0
91
Member Avatar for sundar4047

Hai, I'm trying to load an image using applet.but i didn't get the image. The applet screen was an empty,it shows at the status bar "Start: Applet not initialized" . I don't know how to get a image.pls somebody help me.the codes following ------------------------------------------------------------------------------------ /*<applet code="crim1.class" height=500 width=500> <param name="img" …

Member Avatar for BestJewSinceJC
0
86
Member Avatar for Thirusha

I want to develop a web app that can allow the user to change the type of database he/she is using(Access, Sql Server, Oracle), just by changing the connection properties in a properties file. I am assuming that this is possible. Would it become too complicated meaning way too much …

Member Avatar for stephen84s
0
88
Member Avatar for scrypt3r

Hello, in my webbrowser object, the web page it loads has a java applet in it, when it loads all that appears is a grey box? I have java 1.5 Is there something im doing wrong?

0
55
Member Avatar for britto

hi everyone.... im doing IDE for java swing (like dragging comp into design area)... is there a way to save the design as format and when i open it the design must be showed as it was saved.... Thanks in advance...

Member Avatar for darkagn
0
84
Member Avatar for Donny 619

Hi. I'm trying to develop a currency converter, using live currency exchange rates. I've already designed multiple interfaces and a lot of codes for it, but i just do not seem to be getting this right. I need your assistance, guys. I'm a new member, who just joined the community …

Member Avatar for verruckt24
0
136
Member Avatar for VIeditorlover

Hi, I was told that WPF can not be used in the silverlight - is it true? I mean about ten years ago I was able to write java applets with almost desktop interaface and I did consider silverlight 2 to be much better than that. Suddenly, in VS2008 I …

0
62
Member Avatar for asatess

System restore shows a blank page and sites needing javascript are saying it isnt enabled, although it is. I've looked at various previous posts regarding this topic and tried running various suggested programmes without success. Another suggestion was to download scripts from Microsoft which I have tried to do, but …

Member Avatar for Starnamer
0
235
Member Avatar for neutralfox

Hello guys, I am having a small problem, I want to play a small songs (preferably .wav)when a user clicks on a button. Can someone just guide me please, is there a built in function. I've tried the [code]music.play();[/code] but its not working. Thanks in advance for you answers.

Member Avatar for neutralfox
0
141

The End.