32,199 Topics
| |
Hello all. I started out yesterday trying to understand the point of webservices and how to use them. I found countless tutorials but most of them seemed not enough for what i need to understand or outdated or not "manual enough" so i'd do it myself and get it. IDE … | |
So I had to make a program that calculates the volume of sound at a different distance, given a reference difference, and sound level, and the new distance. It works sometimes but depends on what values I put in. Much of the time it tells me the new volume level … | |
Hello fellow members, I have recently started to study Java, but the lecturer went through basics very fast and now I'm having problems with starting to write a class. I have an idea of how to write the methods, but how to declare the array properly at the start to … | |
Hello I'm a vb.net programmer and I am learning java so I was trying to figure out what is "sender" (VB.net) keyword in java? sender is simply a keyword in VB.net, for example you have multiple buttons having the same event and the code but you differentiate them in the … | |
Can any one tell me why continue statement is not working in if ? i tried with following code [CODE] outA: if(userValue==randomValue) { int luck=s.nextInt(); int randNo=(int)(Math.random()*(userValue*2+(1))); int arrValue=point[i]; arrValue+=userValue; point[i]=arrValue; continue outA ; } [/CODE] but it shows error | |
Hey so I've been working on a lab for my intro to software developing class and have been trying to get my program to work for several days now. It's a real basic program, im sure someone will be able to figure out the issue im having. Hopefully once I … | |
Does anybody have a login using access code of y.daniel liang, Introduction to Java Programming, Comprehensive Version, 8E. thank you if you give it to me to share video chapters..:) | |
"aung myo hein" to "nieh oym gnua" how to convert with CharAt GUI JTextField or JOptionPane | |
Can i get the codes for Bresenham Line Algorithtm. I have searched for it on google and i get the codes but they do not attach the codes to call the class, and also the codes do not allow user input. Am now learning java so adding comments would help … | |
Hello i am new to java and o have to write a program that determines the number of prime numbers less than N which is given by the user, but i have no clue where to start | |
I get this error, [CODE]Exception in thread "main" java.io.IOException: Cannot run program "java -jar C:\Users\Jack\testFile.jar\" (in directory "\"): CreateProcess error=2, The system cannot find the file specified at java.lang.ProcessBuilder.start(Unknown Source) at testProject.Main.main(Main.java:15) Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified at java.lang.ProcessImpl.create(Native Method) at java.lang.ProcessImpl.<init>(Unknown Source) … | |
Okey I am making a simple chess program as an assignment and I ran into a few problems I coded a file called ChessPiece which is the Base class of all the chess Piece eg King ,Queen and etc... We have to create a interface class call ChessPaint that draw … | |
hello all where is the directory to place file below import com.toedter.calendar.JDateChooser; is it correct if the extracted folders and files be placed in folder c:\com\toedter\calendar\JDateChooser ? or because i place my source file in c:\java\src do i have to place the extracted folders and files in c:\java\src\com\toedter\calendar\JDateChooser ? I … | |
can somebody help me with switch statement. [CODE] import java.util.Stack; import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.math.*; import java.util.Vector; public class Ahsan extends JFrame{ Stack s = new Stack(); private JFrame f; private JPanel p1,p2; private final int ADD = 1; private final int SUBTRACT = 2; // declare … | |
hello all is there available code to remove line numbers in front of each line of a text file thank you denny | |
First i create simple claculator.but now I am trying to change it to RPN calculator by using stack.Can some one help me((especially where to use pop method) because I don't know alot about stack.here is my codes so far. import java.util.Stack; import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; import … | |
Hello, if i want the computer to guess a number between 1 - 100 i'll do in java [CODE] int min = 1; int max = 100; [/CODE] I have already create a random number for the computer. so the first random number the computer will choose is 49 as … | |
Hi guys, it's been a while since the last time I post here... I'm currently learning JPA right now for my J2SE project, I dont have problems doing CRUD on a single table, now I want to try to retrieve data on JOIN tables. example if I have 2 entities … | |
hey guys i am developing a game... in which when i press a button it has to change its color... so , i created button, used action listener to it... [CODE] if(ae.getActionCommand().equals("b1")) // here b1 is the button { b1.setBackground(Color.black); frame.invalidate(); frame.validate(); System.out.println("button b1 pressed...!!!"); } [/CODE] i also used … | |
I have this project that I'm working on for my class, but I'm getting stuck with infinite loops and I'm not really sure what's wrong. I'm supposed to assume that at time 0, the ball is at height 0 and the velocity is input by the user. After each second … | |
Hey guys. I need help with a program I'm trying to write. I need to read scores from an ASCII file and display them. I also need to display an error message for any score that falls outside of the range of 0 to 100. And after doing that, I … | |
I have an assignment to create Random Shapes by creating a method randomShape that randomly generates objects implementing the Shape interface. This is what I have so far and don't know where to go from here. [code] import javax.swing.JFrame; public class RandomShapeViewer { public static void main(String[] args) { JFrame … | |
How to store values that are retrieved from mysql database into an arraylist? | |
I use this part to make transparent the JFrame: [CODE] GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice gd = ge.getDefaultScreenDevice(); boolean opacity_supported = gd.isWindowTranslucencySupported(java.awt.GraphicsDevice.WindowTranslucency.TRANSLUCENT); if( !opacity_supported ) { System.out.println("Your platform does not support opacity."); } else { setOpacity((float) 0.85); }[/CODE] It works perfect on Windows. On the same machine I use also … | |
i am trying to load images for an applet using imageicon but i found out that it doesnt work so i was wondering if there is other way to load em. by the way i am trying to load them in another class that is not the main one. this … | |
Hi, I have a school assignment where I need to check if one string is a substring in another string. However, we are not allowed to do any string-based comparison, we are only allowed to compare the ASCII values. So the way I do it now is to call the … | |
I have a problem to Modify the Coin class to have it implement the Comparable interface. The following code is not working correctly and I don't know why. [code] public class Coin implements Comparable<Object> { private double value; private String name; public Coin(double aValue, String aName) { value = aValue; … | |
I want to make a class that takes a String and checks if that String is found in a .txt File. If it is found, I want to store the words following that String in a String array. Here is what I have until now: [CODE]import java.io.File; import java.util.Scanner; public … | |
[B]how to pass parameter from .java class to query written in .jrxml file[/B] pls help me! |
The End.