32,199 Topics

Member Avatar for
Member Avatar for daniiii

Hi guys, I am trying to create a cell renderer that will set a background imagefor cells in a JTable I have created, depending on the data inside each cell. I think I will be able to do the rest, but for now I just want to be able to …

Member Avatar for daniiii
0
88
Member Avatar for rroky

Please any one can help at this problem I have with javac. I have download the java jdk1.5.0_15 at least 20 times in three (3) machins and it do not compile. Actualy it can not read the file. Javac is installed and is on bin, when I type javac it …

Member Avatar for divya bangroo
0
1K
Member Avatar for dowen

why when i add private int yearpublished; my program has an error what is my mistake can you please help to fix it ------------------------------------------------------ this is the error that came out C:\goh>javac libmainsys.java libmainsys.java:19: ';' expected yearpublished = yrpub ^ libmainsys.java:28: cannot resolve symbol symbol : variable yearpublish location: class …

Member Avatar for masijade
0
375
Member Avatar for vgkarthi

I have a new requirement telling me to roll out the log every 8 hours.. I mean.. a new log file must be created every 8 hours.. taking back up of previous logs Is is possible in log4j.prop As far i have searched in Internet, rolling out every 1 hour …

0
98
Member Avatar for jiraiya

Hi everyone, I have a program that displays Chinese and Japanese characters. I've written the program inside Netbeans and it works fine. But when I use the program as an executable jar file, as built in the dist folder by Netbeans, the Chinese and Japanese characters are displayed as nonsense. …

Member Avatar for EnochEnglish
0
422
Member Avatar for Hunter2379

Ok so i made a chat program that works on Lan. Now i want to make it work through the internet. I can get the internet ip address. Something like 99.144.21.93. SO in the socket i make the ip address of the server/client destination the 99.144.21.93. It doesn't work though.

Member Avatar for NormR1
0
90
Member Avatar for abbyo

Any suggestions on how to get fonts from an external drive rather than on my local drive. Here is what I use now: [CODE] GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); Font[] fonts = ge.getAllFonts(); // Get the fonts for (Font f : fonts) { System.out.println(f.getFontName()); }[/CODE]

Member Avatar for CrazyDieter
0
79
Member Avatar for interjuan

Hi everyone, Could some one please tell me or show me the entire codings of how to insert a string to a thml code....like: to "http://www.google.co.uk/" i want to search a string and get the source code of the page result,and one more thing: how can i found a specified …

Member Avatar for CrazyDieter
-1
94
Member Avatar for jiraiya

Hi all, I'm having a compilation problem relating to some Chinese and Japanese characters that I have hardcoded into a hash table. When I compile this code inside an IDE like Eclipse or Netbeans I get no warnings, but when I do it outside of the IDE I get the …

Member Avatar for jiraiya
0
121
Member Avatar for jiraiya

Hi everyone, I'm having some trouble creating an executable jar file that accesses data txt files when running. I've written a program using Netbeans that reads in both images and data and uses this data while the program is running. But when I try to run the program using the …

Member Avatar for jiraiya
-1
69
Member Avatar for guyfrompluto

Simple program to check whether a number is prime or not. Something is seriously wrong because every result I get is 'false'. Help me out please. Thanks in advance. [CODE] class primeTesting { public static void main(String[] args){ int i=7; //changing the value everytime always gives false.... ??? boolean bool=false; …

Member Avatar for guyfrompluto
0
117
Member Avatar for SashaC

I have two issues with my code: 1.When I run the code the components of the GUI are very large. I have attached a screen shot of what it looks like. I'm not sure how to change the size. I've tried using: nameOfButton.setSize(12,12); but that doesn't work. 2. I'm new …

Member Avatar for JamesCherrill
0
177
Member Avatar for nssltd

Sorry for the nooby question, but i've always wanted to make an instant messenger, I figured java was the best language as it is Multi platform and extremely portable. I wondered if their was any open source code i could look at to help me. Thanks

Member Avatar for nssltd
0
169
Member Avatar for Ghost

Hi everybody: I want to make a java application, but I can't think of anything to make. Any ideas would be appreciated. Thanx, C++

Member Avatar for rolypoly2308
0
281
Member Avatar for asiyak

i m final year engg student,i need a mega project in java,plz suggest me some ideas.

Member Avatar for peter_budo
0
79
Member Avatar for Guest51

OK here is my program so far and I'm getting a compile error on my constructor located in class Inventory on line 50 [CODE] // Inventory Program Part 2 import java.util.Scanner; //Inventory program //This program monitors DVD inventory, price, and stock public class Inventory {//new class inventory public static void …

Member Avatar for NormR1
0
136
Member Avatar for M.Jama

I would be thankful if some one explain me where to start in order to access a database in Java on Eclipse Thank you in advance

Member Avatar for M.Jama
0
68
Member Avatar for dupowdis

Thanks in advance for your help, everyone. ...So basically, for a program I have to do for this internship, I have to find a way to extract certain lines of temperature, density, and frequency data from a .txt file, and then pop them in 3 different string arrays. A typical …

Member Avatar for dupowdis
0
123
Member Avatar for papay0011

[code]import java.io.*; class Factorial1 { int fact(int n) { if(n==1) System.out.println(1); else return (fact(n-1) * n); } } public class Recursion11 { public static void main(String args[]) { Factorial1 f = new Factorial1(); System.out.println("Factorial of 3 is " + f.fact(3)); System.out.println("Factorial of 4 is " + f.fact(4)); System.out.println("Factorial of 5 …

Member Avatar for NormR1
0
83
Member Avatar for bin shahid

Hello, I want to retrieve weather information of 'Chittagong' city of 'Bangladesh' country from "BBC.com/weather" from java application. but i don't understand where from i should start. Please give me suggestions. Its urgent. Thanks, Shahid

Member Avatar for NormR1
0
199
Member Avatar for yurixzach

Hi... I really have a big problem in this program... I dont know how to properly read a user input from a text file. I will really appreciate your help. thanks. [QUOTE]import java.util.*; import java.io.*; //--------------------------in this part is my problem----------------------// public void openFile() { File myFile = new File("students.txt"); …

Member Avatar for NormR1
0
137
Member Avatar for stark025

Hi. I am a student, and I have an report to do for our Computer Programming Fundamentals class. We are required to demonstrate the use and function of constructors and the JOptionPane class. I have implemented a simple age calculator using Java as my demo, and I intend to go …

Member Avatar for NormR1
0
214
Member Avatar for jefferlyn92

create a method sumOfDigit(String str) compute and display the sum of the digits found in str Example: String str = "1234hello12678"; sumOfDigit(str) -> returns 34 ---need some codes guys! can you HELP me?!

Member Avatar for ANDIEniable
0
647
Member Avatar for seanvitalaim

Can someone please explain to me why I cannot move variables from object to object. I've been getting no sleep and burning myself out learning java and it is driving me crazy here is the example. [CODE]import static java.lang.System.out; class ONE { public static void main(String[] args) { TWO addition …

Member Avatar for NormR1
0
98
Member Avatar for aditya027

public class Sorting { public static void main(String[] args) { int j=10; int[] arr=new int[10]; for(int i=0;i<arr.length;i++) { arr[i]=j; j+=10; } int num=Integer.parseInt(args[0]); bsearch(arr,0,10,num); } static void bsearch(int[] arr2,int first,int last,int key) { while(first<=last) { int mid=(first+last)/2; if(key==arr2[mid]) { System.out.println("Found the key"); } else if(key<arr2[mid]) { last=mid-1; } else if(key>arr2[mid]) …

Member Avatar for NormR1
0
74
Member Avatar for khunmato

Hello! I have constucted a code for the card game 21. The code uses inputDialogs to "talk" the the player. I thought my shool assigment was over by doing just that...I was wrong, our teacher dumped a new bomb on us. With these kind words; [I]Develop task 5 (Twenty-one card …

Member Avatar for JamesCherrill
0
2K
Member Avatar for Guest51

I am a student working on an inventory app. Until this current assignment I felt I half way knew what I was doing. What is required is the following: [B]~Modify the program to handle multiple items:[/B] should work with this code added - it worked on another program [CODE]//Prompt user …

Member Avatar for JamesCherrill
0
203
Member Avatar for john butler

here is one program which has 1 abstract class without abstract method. its also works fine. Then what the use of abstract class, any how it does not allow to create objects, we can use this with concrete class to implement method defined in abstract class which we have to …

Member Avatar for musthafa.aj
0
109
Member Avatar for arete

I'm trying Euler problem 3 on [url]http://projecteuler.net/[/url] for fun. I think I have a program that works (with very small numbers), but it takes too long. Can anyone give me some hints to improve speed? [CODE] /** * The prime factors of 13195 are 5, 7, 13 and 29. * …

Member Avatar for Taywin
0
151
Member Avatar for RaniThomas

Hi All, Can i Compile a java program without a single line in a main method. If s, how it works. Please explain. Help Me.

Member Avatar for Taywin
0
157

The End.