36,051 Topics

Member Avatar for
Member Avatar for lassy85

The program has no errors and when ran will show the logo, buttons but not the inventory data. I have been working on figuring out why it will not display the cd information with no luck. Could use some fresh eyes to look at this and help me figure out …

Member Avatar for lassy85
0
191
Member Avatar for O_mini

Program created in BlueJ: For this Assignment I am to create a magic square from odd numbers >= 3 input by the user. I want to test my code to see if it works, but I can't figure out how to actually print the square from the number input by …

0
439
Member Avatar for BIGGDRE10

Ok im writing a program in java thats suppose to Use a while loop, to print the lower case alphabeth and its corresponding ascii values of the upper case alphabeth from Z to A So far i came up with while (counter +32) (char) (counter +32) if (counter < ?) …

Member Avatar for zeroliken
0
109
Member Avatar for Skraight

For some reason my output is not showing right when I run it. I am showing the code and providing a screen shot of what it's doing. It's bunching lines together. [CODE]public void requestData() { System.out.print("What is the model number?"); modelNumber = scan.nextLine(); System.out.print("What is the camera brand?"); brand = …

Member Avatar for NormR1
0
158
Member Avatar for LFCFan_07

Hello, I need assistance with this java program I am writing, Im trying to make two buttons and when you click the button, it has a counter, and everytime you click it it prints a message saying I was clicked n times. This is what I have so far and …

Member Avatar for mKorbel
0
2K
Member Avatar for lena1990
Member Avatar for Hypnos_16

[I]Create a program called, Containment, that accepts three command line arguments, a file that contains a list of shapes, and a pair of numbers the specifies the (x,y) coordinates for a point. The program should print out the list of shapes, and a true/false value that indicates if the point …

Member Avatar for Hypnos_16
0
229
Member Avatar for dsmith12

I want the program to compare what the user puts in and then compare that string to something in an array and see if it is a match. Here is code for things already put into array [CODE]private static void createExistingUserData(Scientist[] scientist){ scientist[0] = new Scientist("user1", "password1"); scientist[0].setDob("02/02/1995"); scientist[0].setSsn("612-45-7070"); scientist[0].setApplicantName("Peter …

Member Avatar for NormR1
0
447
Member Avatar for MxDev

Hi guys, I just purchased SCJA exam simulator from whizlabs and i pass the final exam with over 92% but i'm still afraid to fail in the real exam. So, what else i need to do to ensure passing the exam?? Thanks

Member Avatar for MxDev
0
96
Member Avatar for Murphyv10

Just need someone to confirm that what ive done is good . It compiles but i need confirmation that its good and up to standards . this is the first class import java.io.Serializable; public class Flight implements Serializable { //instance variables private String flightNumber; private String day; private String destination; …

Member Avatar for Philippe.Lahaie
0
99
Member Avatar for riahc3

Hey I have this code: This is my main part of my program: [code=Java] import org.apache.commons.pool.ObjectPool; import org.apache.commons.pool.impl.GenericObjectPool; import Fecha; public class someclass { private GenericObjectPool<Fecha> fechapool; public boolean somefunction() { System.out.println("Im going to set set actives"); fechapool.setMaxActive(5); System.out.println("set actives sets"); } { [/code] It doest get to the "set …

Member Avatar for riahc3
0
399
Member Avatar for tartosha

Write a program that reads characters from the keyboard until a period is received. Have the program count the number of spaces and display it to the user. After that, ask the user if he/she would like to count a specific character. Terminate when the user is done counting the …

Member Avatar for stultuske
0
213
Member Avatar for exonwarrior

Hello all, I have an assignment for one of my modules which involves writing UML Class diagram software which then outputs skeletal java code. The main window contains 3 things - a menu bar at the top, a panel on the left-side containing buttons and a draw area, where the …

Member Avatar for NormR1
0
99
Member Avatar for DontQueef

Hey guys, I am taking my first quarter of java at college and i'm having some difficulties with just 1 method for my current assignment. I wasn't planning on getting help, but I've been stuck on this for hours now, so i've decided to go to the pros. Here's what …

Member Avatar for NormR1
0
123
Member Avatar for Bawen

hey guys ive been given a peice of work which i totally forgot about, its due tomorrow and i have no idea what im doing, can any of you guys help me out there please, as i will be learning how to use java after i hand this work in …

0
103
Member Avatar for learner15

If the class members declared public and the class itself is specified as default access ( Package access), then can the public members of that class be used in another package? I am asking this because .. as far i know class which is not specified as public cannot be …

Member Avatar for NormR1
0
194
Member Avatar for wallet123

[CODE]import sun.audio.*; import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.io.*; public class Sample { public static void main(String s[]) { JFrame frame = new JFrame (); frame.setSize(200,200); JButton justin = new JButton ("Click Here for Welcoming"); frame.add(justin); justin.addActionListener(new AL()); } public static class AL implements ActionListener{ public final void actionPerformed(ActionEvent …

Member Avatar for TIM_M_91
0
243
Member Avatar for dineshswamy

i ve already worked many time on this code ,but couldnt find whats wrong. [CODE]import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import javax.servlet.ServletException; public class AppletServer extends HttpServlet { public void doPost(HttpServletRequest rq, HttpServletResponse rs) throws ServletException,IOException { String s,n,v; try { rs.setContentType("application/x-java-serialized-object"); InputStream i=rq.getInputStream(); ObjectInputStream oi=new ObjectInputStream(i); OutputStream o=rs.getOutputStream(); ObjectOutputStream …

0
64
Member Avatar for jayadan

i dont know what mistake i have done here i could run the prog but i am not getting the o/p so guys pls help me and this is the coding if any corrections is need pls let me know and if possible change and send me the correct prog …

Member Avatar for stultuske
0
278
Member Avatar for shean1488

Hi everybody, I want to have some kind of a cursor in my program. My goal is: everytime when I write a getName() method I want it to return a next value. But the thing is I don't want to delete any elements befour. So please help me to give …

0
56
Member Avatar for 06070827

Hello! My friend recommended that I try this site if I needed advice on my programs, so I thought 'hey, why not?'. I'm working on a program that is to draw shapes and store them in arrays. I kinda can't figure out how to make my print functions work correctly. …

Member Avatar for 06070827
0
184
Member Avatar for pitamber

Hello, I was just wondering how i could write a TicTacToe program in java without arrays. I am new to programming and i don't know lot of stuffs, so any help would be appreciated Thanks

Member Avatar for pitamber
0
1K
Member Avatar for jayadan

I runned my arithmetic operations with double data type and i got o/p for postive,negative and decimals nos and if i am using three pont decimal no(0.0005) means i am getting as (2.5E-7 & 4.0E-4) two diff nos and this is my code [ICODE]import java.io.*; public class arithmetic { public …

Member Avatar for jayadan
0
178
Member Avatar for Zennie2005

Modify the Inventory Program: Create a new method that calculates the value of the entire inventory. Create another method that sorts all of the array items alphabetically (ascending order) by the product name. o The application should declare and use an array to store 5 items. This array will represent …

Member Avatar for Zennie2005
0
161
Member Avatar for ilovejava

This is my code for adding and removing from a binary tree but apparently its not complete can anyone tell me what to do to make it complete tree? [CODE] public void add(IBinaryTreeNode<E> e) { if (getRoot() == null) { setRoot(e); } else { //SAME HERE IBinaryTreeNode<E> node = getLastNode(); …

Member Avatar for ztini
0
251
Member Avatar for asif49

Consider I have an object O which is linked to an array of several object O's that can be retrieved by doing O.getAllObjects(); For a given object O, I want to see from the top down all links from a given object I.E O1 > O2 > O3 > O4 …

Member Avatar for asif49
0
127
Member Avatar for Gsterminator

Hello community, I have an issued converting a arithmetic string called the infix, into a prefix output. In one of my methods i have an infinite loop. An example would be (a + b) * (c - d)===> * + a b - c d Here is my code: [CODE] …

Member Avatar for Gsterminator
0
1K
Member Avatar for sincerelibran

Dear Friends, I have a frame which is a JSplitPane which is split horizontally into two. On the upper half I want a JFrame to appear and on the lower half I want a JTable to appear. I tired but couldn't get the answer correctly. Will anyone be able to …

Member Avatar for jouj
-1
745
Member Avatar for summey

I want to split the following into a Main class and do all the math in a mortagecalc class The Arrays are tripping me up im not sure how to pass these to another class. Thank you [CODE]package mortgageCalc; import java.text.DecimalFormat; public class Mainbkp { /** * @param args * …

Member Avatar for summey
0
148
Member Avatar for allan2020

Hello All, I have a java assignment thats supposed to create a memory game, with 10 rows and 10 columns.50 images have been supplied. The part i'm stuck is the the window with the actual images on the grid.The images are supposed to be generated randomly each time the application …

Member Avatar for NormR1
0
190
Member Avatar for fatooma92

i need someone to do this program for me and before saying that i have to do my homework alone i had midterms all week and in about in hour or so and i forgot about this assignment and i just dont have time so plz help here it is …

Member Avatar for jbennet
-1
170
Member Avatar for ilovejava

Hi when I use ecclipse to run codes it shows many errors, and they are not errors at all I compiled them with command prompt and it work. this is the image [URL="http://i.imgur.com/az6Pg.jpg"]http://i.imgur.com/az6Pg.jpg[/URL] My java and javac version is 7 u 2

Member Avatar for designuts
0
2K
Member Avatar for htp367

Hi everyone, In my simple GUI, I have a part where I use JFileChooser to let user browse for a file. The problem is that when browsing for that file, in order to open a sub folder, user has always to double click that the main folder to open the …

Member Avatar for htp367
0
720
Member Avatar for adil_bashir

hello everyone, I have implemented RSA algorithm in java but now i am asked to determine the time for encrypting variable length messages(plain text). As an example, i have to find the time in which input message of length 3 will get encrypted, similarly the time in which input message …

Member Avatar for DavidKroukamp
0
262
Member Avatar for MicroD

Hello, i'm trying to parse file but i dont know how i tried everything. This is my Goal: [21:53:51] Started [21:53:54] Test >> [COLOR="red"]this is that what i want ot parse[/COLOR] . [Test] [21:53:54] Something Can someone help me. - Regards!

Member Avatar for stultuske
0
116
Member Avatar for riahc3

Hey Is there a way I can print out the line Im currently on Example: [code=Java] public class something { public void somefunction() { System.out.println("I am line number + " /*the number 6 would appear here*/); System.out.println("I am line number + " /*the number 7 would appear here*/); System.out.println("I am …

Member Avatar for StephNicolaou
0
124
Member Avatar for karthikprs

I am trying to extract the number in the string "(c) 2010 Elsevier Ltd" from a PDF document . I found that the textsearch method of PDFtron package would help me find the string as stated in the example code: [CODE]import pdftron.Common.PDFNetException; import pdftron.PDF.*; import pdftron.SDF.SDFDoc; // This sample illustrates …

Member Avatar for karthikprs
0
3K
Member Avatar for darria

I did it but I got different outcome?? This program is an exercise in generic (singly) linked lists. A parameterized list class with just a few operations. Then,create lists from this class using two different classes for the type parameter creating a "list of lists". You will write a driver …

Member Avatar for peter_budo
-1
141
Member Avatar for htp367

Hi everyone, I want to create a simple GUI that prompts user to browse for a text file, read in that file and display them in the GUI as a list. Then it should allow user to select from that list. Once an element is selected, there should be a …

Member Avatar for NormR1
0
340
Member Avatar for Zennie2005

Modify the Inventory Program: Create a new method that calculates the value of the entire inventory. Create another method that sorts all of the array items alphabetically (ascending order) by the product name. o The application should declare and use an array to store 5 items. This array will represent …

Member Avatar for NormR1
0
153
Member Avatar for softDeveloper

Hi all, I'm checking for primality in BigInteger type. I'm using isProbablePrime with certainty 15. I would like to know how to test if a BigInteger is really a prime number. Thanks in advance.

Member Avatar for softDeveloper
0
282
Member Avatar for Kert

Hello, Can somebody help me with the problem I have? Anyways, I have a ArrayList that consists of Arraylist that consists of 3 elements. [[a1, 11, x], [a2, 12, ], [a3, 13, ], [a4, 14, o]]. The 0th and second element are both strings, the first one an integrer. At …

Member Avatar for DavidKroukamp
0
214
Member Avatar for Pravinrasal

hi, I have created one array in java script like this: obj.push({'key' :value1, 'key2' :value2}) and it is stored in database ,but problem is that when I am retrieving again back from database I am confusing to how to get array from database because it is stored in following format …

Member Avatar for stultuske
0
133
Member Avatar for yuyumerry

i got problem when i clicl the checkbox 0r radiobutton..when i compile there is no error..and also how can i put the background image at my gui??hope you guys can help me.. import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.text.*; import java.text.DecimalFormat; import javax.swing.border.*; import java.awt.GridLayout; import java.awt.FlowLayout; import java.awt.BorderLayout; …

Member Avatar for yuyumerry
0
369
Member Avatar for Syrne

Hello, Quick and easy question: I'd like to learn a little by investigating the source code behind the predefined Java methods/classes/etc. For example, right now I'm learning to work with TreeSet and I'd like to know exactly what's going on behind the class-specific methods such as 'first', 'last', 'pollFirst', 'pollLast', …

Member Avatar for peter_budo
0
757
Member Avatar for jbennet

How can I get SSL working in Tomcat 6.x under Linux?, ive read the documentation here: [url]http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html[/url] but im not sure how to do it with a certificate I will make myself (its a dev box)

Member Avatar for jbennet
0
215
Member Avatar for Gajanan Jaiswal
Member Avatar for softDeveloper

Hi all, In my web application I load data from MySQL database into an iframe. Sometimes files bigger than 1 Mb. I make some changes on the file, and afterwards I send it back to the database. The issue is that with this code below I can't send files bigger …

Member Avatar for peter_budo
0
105
Member Avatar for Jevran

Iam working on a java based web app using the Eclipse ide and the tomcat server, My question is, is it possible to develop this app using the ide in my computer an a tomcat server located in another. All the guides i found involve me making the server in …

Member Avatar for peter_budo
0
170
Member Avatar for tboz203

i am a freshman computer science major, studying ahead of the class. we have been using automated testing classes { junit.framework.TestCase; }. i have downloaded junit4.9b2.jar from junit.org, which i understand to be the junit package (?) but i don't know how to use it. i have read that javac …

Member Avatar for peter_budo
0
1K

The End.