32,204 Topics
| |
Hey there, I am aware of GridLayout, BorderLayout and FlowLayout classes. However, I find them not to work satisfactorily well for me when trying to layout the entire content in a frame. What I usually do is this: I identify parts that I want in my window. For each part, … | |
Hi all, I'm coding Conway's Game of Life for my Java class and I've run into some logic errors. My problem so far is the fact that I have a section of code that looks similar to this: [CODE]if(board[i][j+1].getLife() == 1) board[i][j].setNumNeighbors(1); //Where setNumNeighbors(int n) { numNeighbors +=1} }[/CODE] etc, … | |
I'm using Ehcache beside Hibernate. I need a cache manager in my project that could do these things below: 1- I wanted to refresh some caches 2- I wanted to remove some caches I will be happy if someone can help me and also guide me how to make a … | |
Soo my program is working...but there is just one problem...null is also being printed along with the content or string from the file... is there anyway i can stop null from being printed. The code read asks a user to give a filename .txt then the user is asked a … | |
| I'm trying to create a java applet that displays farhen and cels temperatures in a chart. Temps below freezing need to be displayed in blue, and about boiling displayed in red. It needs to use applet graphics to draw the strings in different colors but I'm fairly lost when it … |
I heard if i dont have 3 yrs experience in java i wont be able to get a job easily. Does DotNet have more market value than Java ??? What I've heard is that java is in more demand and also it is less frustrating than DotNet. Please clear me … | |
In the following example: [code] public class JavaExample { public static void main(String[] args) { system.out.println(args[0]); } }[/code] when no parameter is passed Exception given is java.lang.ArrayIndexOutOfBoundExpection So my Question is that Why is that Exception is thrown , why not NullPointerException. (I know when both expection thrown) But in … | |
Hi all, I am attempting to connect to a MS SQL Server Express Edition with Advanced Services (MS SQL10) on a remote Windows NT 5.2 machine on the LAN. My driver is [B]net.sourceforge.jtds.jdbc.Driver[/B] My url for the connection string is [B]jdbc:jtds:sqlserver://127.68.0.201:1433/LOD[/B] My user is [B]d[/B], password is [B]d[/B]. Now, when … | |
how to execute a java program when we try to delete it....???? | |
I am creating a java program that will take 10 user input grades from 1-100 and display them as a letter grade, then calculate the percent of how many letter grades there are in total. The last step is to figure out how to get each letter grade, lets say … | |
Hi, I am working on a calculator using Java Swing, and have it done, but I was wondering how you would make it so, say when a certain keyboard button is pressed, that number will appear in the text box. Currently, it works so when you press said JButton, that … | |
Dear sirs, I would just like to ask a quick question: What control would i use for creating a paint-like program but with layered features? It was a choice between GlassPane (but am not to sure how to use it despite the fact i have been up all night researching … | |
How to isolate digits in a long variable for JAVA? long 122343434434 how to isolate the 2nd number? | |
I need to write a code to find greatest common factor of two numbers but I have no idea how? any help? please. | |
where does eclipse get installed, i know ive choose the folder for the workspace, but not the IDE in its whole. why? im on win32 and i need to drag a shortcut on my desktop thx Fund it, nevermind, it's the uncompress folder and it doesn't install itself. DarkMonarch | |
My problem is that the image is not showing on my java. here is my code MyGame.java [CODE]package mygame; import javax.swing.*; import java.awt.*; import java.awt.event.*; public class MyGame extends JFrame { Container c; Player p; MyGame() { this.setTitle("My Game"); this.setSize(600, 400); this.setLocation(100, 100); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); c = this.getContentPane(); p = new … | |
Is anybody familiar with using ObjectEditor in Eclipse? I am working on a program and I need serious help. | |
So I need help on how to calculate how much change to give back to a customer. I need the program to give change in the least bills and coins as possible. Ex. Customer's item costs $13.37. He/She pays $20. Program gives back: One $5 Bill One $1 Bill Two … | |
Hello! I have a swing app with lots of components and stuff. I want to place a Container/Jpanel on top of everyting else that is invisible that contains other component which are visible. I can make the panel invisible or not opaque and still show its child component but I … | |
Hey guys basically I'm studying programming using the 'BlueJ' Java program on windows. I'm trying to create a 'Dynamic Billboard' program that asks a user to enter a 5 letter word than the characters are displayed on a billboard, the program uses a text file imported for the charcters). Ive … | |
I'm having trouble debugging one of my methods. The class Student inherits a class called Person and the methods are called in the main program, TestStudent. I'm trying to create a method that lets the user sort an array of grade averages in ascending order but whenever I try, I … | |
i 've got a steganography project in java.......in that we can hide text within pictures and videos......but the major disadvantage is that the hidden data is been destroyed when the image or the video is further modifies with the hidden data............is it possible to do a steganography project in java … | |
Hopefully someone can help me...I'm a student taking my first Java class. We are working on classes (building them). For this assignment the teacher gave us a test program that we have to build a class for to computer some basical mortgage calculations. Below is the class I built that … | |
Hi all, For my java class I need to make the game of life. So far I have 2 main classes that drive the program (ignoring GUI class for now.) My main classes: Cell(x, y) - where x = the x coordinate and y = the y coordinate of the … | |
| Hello I'm having major issues, please help me with this code; (Generating random characters) Use the methods in RandomCharacter to print one hundred uppercase letters and then one hundred single digits, and print ten per line. Use these methods: public static char getRandomUppercaseLetter(){ return getRandomCharacter('A', 'Z'); } public static char … |
I'm having trouble sorting names in alphabetical order using counting sort, forinstance Gregory John, Alex Smith, Adam Richard, Alex Ryan Output hould be in this order Adam Richard Alex Ryan Alex Smith Gregory John My code so far [code] import java.util.ArrayList; import java.util.Scanner; public class Names { //private static int[] … | |
Hi.. I have downloaded a code to add JRadioBuotton to JTable, modified it.Please see the code..What i wanted was to have blank cell...i was getting a NullPointerException for this so i tried adding a JTextBox for instead. When I click on only radiobuttons the code works fine.. if i click … | |
[CODE]public GuiPrototypeScreen1() { GuiPrototypeScreen1Layout customLayout = new GuiPrototypeScreen1Layout(); Object[] possibleValues = { "Search", "Contribute" }; Object selectedValue = JOptionPane.showInputDialog(null, "Do you want to ", "Welcome", JOptionPane.INFORMATION_MESSAGE, null, possibleValues, possibleValues[0]);[/CODE] Hey guys i need help because i am completly stuck. All i want is when a string is selected to redirect … | |
The output is obtained from a JPasswordField and placed into a text. But whenever I enter a new input on the field, it just shows the recent one I've entered... Ex: I enter "test1" as a password. When I enter a new one, say "test2", it only shows "test2" in … | |
hay this is samar here actually i have to get values from tha my sql foe a perticular string which i pass through a xt box i think i'm not able to pass the vehicle no. to the querry this is my cade pls help [code]package p2c; import java.awt.Container; import … |
The End.