32,204 Topics
| |
I've made a small program that draws black rectangles on a JPanel at random places. I would like to give the user the option to save this JPanel as a .gif file, but I'm not sure where to start. The function I need to write is SaveJPanelAsGIF below on line … | |
I've done some searching, and it seems a few people have asked similar questions, but none of them were quite what I was looking for. I need to be able to read lines of code from a .txt file, and then execute them in Java. Or, if that's impossible, would … | |
Hi!! my application have 2 frames including tabel 1,tabel 2 when run time i insert values though textfileds to tabel 1 ,after inserting 5 or more then i click next button then display other frame with tabel 2 and tabel 2 must auto filled. my problm is last row(i already … | |
Hi, I'm new to Java, getting compiler error for the following code: class A { int x; A (int a) {System.out.println ("class A");} } class B extends A{ int x; B() {System.out.println ("class B");} public static void main (String[] args) { A a= new B(); } } The compiler error … | |
Is there a "neater" way to code the following? (It prints the 5 data elements in an array.) System.out.println("All the values in the array are: "); System.out.println(+ array1[0]); System.out.println(+ array1[1]); System.out.println(+ array1[2]); System.out.println(+ array1[3]); System.out.println(+ array1[4]); Thanks, Bud | |
Good day! I was writing a code that will compute the salary of each employee on our school depending on their position using a FileReader(File Handling). I only managed to do this code and don't know how to start again [CODE] import java.io.*; import static java.lang.System.out; public class admin { … | |
I have an assignment here.Can anyone Please help me in doing it because i haven't copied the codes that my prof gave me. Using BufferedReader create a program that will complete the salary of the employee. Use the ff: formula: BasicPay=Rate * Number of hours worked OvertimePay=(rate * .30 + … | |
Hello, I'm trying to write a code to check if two strings are anagrams. i have already figured out a code but I can't get it to work for words of different cases and words with whitespace. I would really appreciate any input Thank you! Here is what I have … | |
hi how are you gays in java i have question about constructors , i just starting learning java since few weeks [COLOR="Red"]how i can define string in construtor using one argument ..[/COLOR] how many constructors are there in the string class >? how i can count the number of words … | |
hello to all my program creates a boolean for mailing and outputs "i brought my ride " when it is false i.e the customer will not like his purchase to be delivered and outputs "your purchase will be delivered " if it is true...... my problem is it outputs your … | |
For a school project, I am trying to make a program that gets user input and finds the factorial of the input. I wrote this bit of code and got tons of errors. Help, anybody? [CODE]import javax.swing.*; import java.awt.*; import java.io.*; import java.util.*; class TestFactorial { public int x = … | |
I am attempting to take 2 integers from a MySql table. X represents a number that will be stored into an array. Y represents the number of times that X will be put into the array. I am attempting to make a loop that will go through, find all the … | |
I'm practicing for my java test on sunday and I did this lab and everything is okay except for the zero I don't know why the zero is there and I want to reverse the triangle form this : 0 10 210 3210 43210 to this 1 21 321 4321 … | |
I'm practicing for my java test on sunday and I did this lab and everything is okay except for the zero I don't know why the zero is there and I want to reverse the triangle form this : 0 10 210 3210 43210 to this 1 21 321 4321 … | |
I am in desperate need of help... I were to create Operating System's Shortest Job First Preemptive Algorithm .... The problem is that I am not getting how to calculate the average waiting time of each process... HELP ! SJF.java: [CODE] import javax.swing.JOptionPane; import java.util.*; public class SJF { int … | |
Dear All, I am inserting a string value into my mysql db which had apostrophe with no problem because I do this when inserting. [CODE]String cleanMessage = oriMessage.replace("'","\\'");[/CODE] The problem when I try to read from the same table I tried like this [CODE]level2[0] = level2[0].replace("'","\\'"); String queryCheck = "Select … | |
let an integer say, x=0xffffff0; when i shift left 4 positions in it.it got negative. x=x<<1; doing this 4th time,number got negative. please tell why it is so. | |
Hello, I am trying to build a GUI with 2 textfields (1 for tutoring time & 1 for payment for session), a textarea (display the inputs in 2-D array & show report), and a few buttons (ENTER, RUN REPORT & QUIT). The two textfields are for the user to enter … | |
Hello everybody! Has anyone here used GXT to build web application? I just want to know how did you handle breadcrumb? How you create it? | |
Suppose the xMethod() is invoked in the following constructor in a class, xMethod() is _________ in the class. public MyClass() { xMethod(); } A. a static method B. an instance method C. a static method or an instance method what is the answer a or b or c | |
I need this program to encrypt by making letter a letter z and b, y and so on. The proffesor got us started by giving us this program and for the life of me i can't figure out how to change it. [CODE] public class ceaser { public static void … | |
Hi! Im a beginner in programming, and I have been given an assignment to program a TicTacToe game. I could not find any programs as such for reference over the Interwebs thus would want the expertise of daniweb users to help. The problem im having: 1. How do i transfer … | |
Hi all, I'm working on a system that does a bunch of stuff, as well as monitors the current date on a system, checks it against a stored date in a database, and if both dates are exactly the same, sends an email automatically to a bunch of users. Now, … | |
Hello, as i know java source code is visible to ppl, i talk about Desktop Applets, i'm interested to start learn Java/Web Developing, that i want to know is, Can ppl see code of java applet in brwoser? like he can with Java Desktop Appis. | |
Hey guys! I created a facebook type program. The user may load an image, tag the image, and remove tags. I've done the loading of an image, now I'm working on tagging the image. My problem is how do i make it so that when I click the "Tag photo" … | |
please help me by answereing my three question 1)page redirection is possible through which methods? 2) another question which is the default port number of jws? 3)we can write servlet programs by using http packages only ah? | |
i have to create a city application that prompts the user for a series of city names and then displays the number of city names entered and then the name of the city with the most characters in uppercase letters. how come it always output the last name entered ? … | |
Netbeans is a free, open source IDE for developing software in Java. It's been around for almost 15 years, having gotten its start around the time Java began. Version 7.0 is about to be released, and I got my hands on the Beta release of this new version. In the … | |
| Hi guys i am trying to write a program that uses two classes, Board and Game, to run the Game Of Life. Currently my output is in the console, as a GUI is going to take too long. I am having some trouble writing my nextGeneration method in the Game … |
give me reasons why JVM is platform dependent? i dont find convincing answers. The ultimate aim of a compiler is to make codes that are to be understood by native machine processor ? if this is the case why there is an interference of operating system(platform)? |
The End.