32,204 Topics

Member Avatar for
Member Avatar for CoilFyzx

Hello Good day. Here is the problem I am trying to solve. I have a table as seen below. ![232465554203149acd8363d3a4a127ae](/attachments/large/3/232465554203149acd8363d3a4a127ae.jpg "232465554203149acd8363d3a4a127ae") My GOAL: Columns A through G are going to be filled with integers. (I have already created an integer model so that these cells only take integers). As the …

Member Avatar for CoilFyzx
0
449
Member Avatar for poopuh

I've been asked to edit the code in this post http://www.daniweb.com/software-development/java/threads/455560/java-recursion-brute-force-sim so that it "Runs the function as a thread which wouldn’t then hang the program whilst it’s waiting for the result". I've looked it up, but I'm struggling to apply it to this program, any tips?

Member Avatar for JamesCherrill
0
637
Member Avatar for abra_ka_dabra

I am using the following code to write to the file out1.txt: try{ FileWriter fostream = new FileWriter("out1.txt"); BufferedWriter out = new BufferedWriter(fostream); out.write("jlsdfjdlsfhsdkjf"); out.close(); }catch (Exception e){ System.err.println("Error: " + e.getMessage()); } Now i want to write to multiple files in the same code (let us say 2 files). …

Member Avatar for JamesCherrill
0
6K
Member Avatar for sirlink99

Hello. I submitted [this](http://www.daniweb.com/software-development/java/threads/455615/java-decryption-problem) post a little while ago where I had problems with decrypting what I encrypted. Now my problem is that when I encrypt something and then decrypt it, the decryption works with txt files, but when I try to decrypt microsoft documents, then they will not open. …

Member Avatar for sirlink99
0
542
Member Avatar for hashim5003

I want to count the number of attempts the user tried to guess the correct guess. How would i do that? like I have thought of a number. Try to guess it Take a guess: 5 Your guess is higher than mine Take a guess: 3 Your guess is lower …

Member Avatar for hashim5003
0
4K
Member Avatar for cheesy_ninja45

I'm trying to make this work, and I keep getting errors, can someone fix it and show me what's wrong? I've been trying to fix this for a few days and I can't. Thanks in advance. import java.awt.*; import java.applet.*; import java.util.*; import java.awt.event.*; import javax.swing.*; public class FrameX extends …

Member Avatar for stultuske
0
224
Member Avatar for Violet_82

Hi chaps, I am looking for a not too difficult exercise which involves superclasses and subclasses (the java book I am reading doesn't really have any good one). So I was thinking about something like this: Create a superclass 2DimensionalShapes and 2 subclasses Rectangles and Triangles. I will then need …

Member Avatar for Violet_82
1
244
Member Avatar for modesto916

Hello, My teacher asked us to write a little O.S simulator, my group has to write the file system module. We are using contiguous block alocation for the files, we would like to represent the utilization of the blocks using a colored matrix, where the used blocks would be red …

Member Avatar for modesto916
0
142
Member Avatar for james12James12

Tryin to sort a search method for abit of code. Have an array list reading from a csv. Any help on how I can get a search method searching through and displaying onto a jTextArea? This is my code in my Gui public class DataGUI extends javax.swing.JFrame { public class …

Member Avatar for stultuske
0
298
Member Avatar for abra_ka_dabra

running 'java -version' on my cmd prompt gives me the version of my JRE but when i run my programs as 'javac abc.java' it says 'javac' is not recognised as an internal or external command, operable program or batch file. I have set the Path variable by appending C:\Program Files\Java\jre6\bin …

Member Avatar for JamesCherrill
0
342
Member Avatar for Jasonfran

Hello, I have created a GUI using the Netbeans GUI Builder and I have a JTextArea that I want to output to, but because I need to use threads I am doing a lot of processing in an external thread. I am having issues outputting data from the thread class …

Member Avatar for stultuske
0
2K
Member Avatar for Tango2010

Hi, I wonder if anyone can possibly help. I am trying to teach myself how to integrate a Java video into a Java GUI / Swing Application. I am pretty competent with building Java graphical user interfaces and the background Java application code, however I am puzzled with how difficult …

Member Avatar for nvrandow
0
476
Member Avatar for vongola.lee

Hey, Can i know how to do the throw and catch for my java code ? i need to create a OfferException class which allow a suitable error message to be specified when there is an error. this is my code.. public boolean makeOffer(int offerPrice) if (!super.getSaleStatus()) { System.out.println("Error - …

Member Avatar for peter_budo
0
142
Member Avatar for peter_budo

I have four JTextFields where user is allowed to enter only numbers. Question is how do I do this?

Member Avatar for JamesCherrill
0
9K
Member Avatar for Jasonfran

Hello, I am making an IRC application and I was wondering how I could make a simple event that gets called like onMessage() every time a IRC message comes through so I can then do something like this in my main class: public void onMessage(String message){ System.out.println(message); //or Handle commands …

Member Avatar for JamesCherrill
0
206
Member Avatar for timi_ca

Im new to java swing, and Ive got a little problem. So I've got a class Flight.java. In there I have a method displaySeat2D(). First I had this done with the scanner. Now I have to use swing. So basically I made text fields to take in number of rows …

Member Avatar for timi_ca
0
2K
Member Avatar for limaya

Write a java program to calculate and display the product of the odd integers between 0 and 50

Member Avatar for JamesCherrill
0
134
Member Avatar for somjit{}

can the members suggest some books/links that takes advantage of what i already know about oop (the basics , from java) and utilises it to make learning C# a faster process? perhaps i should have posted this on the C# forums , felt i should keep it here as my …

Member Avatar for somjit{}
0
248
Member Avatar for salomonsk8

Hello all, So I have been scouring the internet trying to find an answer to my question. I usually never have to post a question because someone somewhere has asked it, but I guess there is a first for everything. I am a VERY intro level, brand spankin new 'programmer' …

Member Avatar for salomonsk8
0
501
Member Avatar for abra_ka_dabra

In the code below, I am trying to convert the target[] strings to a given format in target1[] and then sorting them using bubble sort and store it in target2[] which is a date object array.. However, when the desirable format is "EEE MMM dd kk:mm:ss z yyyy", it is …

Member Avatar for JamesCherrill
0
253
Member Avatar for poopuh

Hey guys, I'm planning to develop a java web text editor which stores its entries on a MySQL database and is then private for every user. This is a learning curve for me and I will share all of my findings and such on here. Can anyone give me any …

Member Avatar for stultuske
0
253
Member Avatar for Mr.M

Hi DW I'm a VB.Net user and I have a project which I'm doing and the problem is that I didn't find the answer to my problem in VB.Net I found it in Java so now I'm forced to complete this project in java, I must say this is a …

Member Avatar for stultuske
0
222
Member Avatar for overwraith

Hello, I am working on a program, and I noticed that all my threads are starting and stopping in exactly the same order I put them in, and they are not trading places in the output, or mixing output like concurrent objects should. Here is my code: public class RaceHorseAppII …

Member Avatar for JamesCherrill
0
130
Member Avatar for willjohanz

1.A________ statement consists of a valid identifier 2.A__________ statement is used only in case of nested loops 3.The port number 555 describes ***port 555 ***all ports greater than or equal to 555 4.The ____ method of the signature class updates data by a byte 5.The _______ constructor creates a horinzontal …

Member Avatar for stultuske
-3
152
Member Avatar for willjohanz

1.JDBC is an acronym of JavaDatabase Connectivity true/false 2.which of the following are advantages of JDBC -continued usage of esting data -vendor dependent 3.The ______ method of the string tokenizer class returns true if theres at least one token in the string aftre the current position -lastidexof -tostring -substring 4.Adavantages …

Member Avatar for JamesCherrill
-1
174
Member Avatar for hg_fs2002

I am writing a program that needs to know the type of constants. I am wondering if there is any way of getting this in java? Like for constant "2" type is int and for "2.0" type is double.

Member Avatar for JamesCherrill
0
182
Member Avatar for sirlink99

I am attempting to encrypt and string and then decrypt it. I have the encryption part working, but when I try to decrypt it gives me an InvalidKeyException and says that it is missing parameters. Here is the code import javax.crypto.*; import java.security.*; public class Cryption { private Cipher c; …

Member Avatar for sirlink99
0
1K
Member Avatar for Jasonfran

Hello, I am making a Java IRC bot and it all works fine. I connect via a socket and there is a while loop that will output whatever comes through the IRC. But, I also want to accept console input while the program is running. So far I can only …

Member Avatar for stultuske
0
193
Member Avatar for boiishuvo

the data file contains: 1908,Souths,Easts,Souths,Cumberland,Y,14,12,4000 1909,Souths,Balmain,Souths,Wests,N 1910,Newtown,Souths,Newtown,Wests,Y,4,4,14000 1911,Easts,Glebe,Glebe,Balmain,Y,11,8,20000 Each line represents a season of premiership and has the following format: year, premiers, runners up, minor premiers, wooden spooners, Grand Final held, winning score, losing score, crowd What I need is to display a list of Grand Final held as 'Y'. …

Member Avatar for stultuske
0
351
Member Avatar for poopuh

How to I create an exe file? I've downloaded JSmooth, but it say I need binary files and I am a little bit confused. My project is in Netbeans.

Member Avatar for stultuske
0
92

The End.