32,199 Topics

Member Avatar for
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
241
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
340
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
474
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
141
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
496
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
128
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
324
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
Member Avatar for ShivaRJ

In interview i faced the problem with this program finally i lost that oportunity,i am trying for that code to solve almost for a month ,i can't get get that one, plz help me i can't solve the program upto now. the program was........... he gave me a big String …

Member Avatar for stultuske
0
341
Member Avatar for chandub

hi am creating .xls file by using POI library. This code will create xls file, but it's not giving space between border of cell and its content.how can i set space to content type property. Thanks HSSFWorkbook wb = new HSSFWorkbook(); HSSFSheet sheet = wb.createSheet(styleSheetName); HSSFRow row; HSSFCell cell; HSSFCellStyle …

0
201
Member Avatar for Manuelphp

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Webpage</title> <link href="page.css" rel="stylesheet" type="text/css" media="screen" /> <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script> <link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" /> <link href="test.css" rel="stylesheet" type="text/css"/> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script> <script type="text/javascript" src="date_ime.js"></script> <link rel="stylesheet" media="screen, print, handheld" type="text/css" href="calendar.css" /> …

Member Avatar for LastMitch
0
193
Member Avatar for axitya

Yes, I know what I'm talking about. which is Creating my own compiler to compile a language say C++,Java,Ruby, Python ..(Any one of them ofcourse -.- ) Actually, if I can just get the source code for an existing one that would be much better. [example] Say there's Turbo C …

Member Avatar for felceyboy
0
354
Member Avatar for godzab

I am trying make a linkedlist remove() method. It only works half way. When I try to remove a number, it removes the whole right side. For example here is the output: ` before remove: 8,7,3,5,2, after remove: 8,7,` How do I get it so only the three is removed? …

Member Avatar for godzab
0
232

The End.