32,199 Topics
| |
hey i just wanted to know if the available tutorials will be enough for me to improve from a beginner to maybe someday a teacher in java programming. | |
Hello guys, I don't really need a solution, just answer - some Swing insight. So I have a panel, and a list on it. The list is populated with strings. The problem is the following: If I add the list elements too fast, I end up with different kinds of … | |
| Hello people! I am working a little with JAVA programming. And I have a couple of assignments left. When they're both done, I graduate! :) However, I'm not fully familiar with threads. So I don't know how to solve these problems. I thought that perhaps someone could lead me in … |
[code] Enumeration portList=CommPortIdentifier.getPortIdentifiers(); CommPortIdentifier cpi; while( portList.hasMoreElements() ) { cpi=(CommPortIdentifier)portList.nextElement(); System.out.println( cpi.getName() ); } [/code] output : COM1 LPT1 LPT2 COM1 LPT1 LPT2 ---------------------------------------------- in line : PortList=CommPortIdentifier.getPortIdentifiers(); ports "COM1" "LPT1" "LPT2" are listed twise each. if you debug this part of code and check portlist variable you will find … | |
i want to extract 576 to hundreds = 5 tens = 7 ones = 6 my code does this purpose, but.. [CODE=java] h=num/100; t=(num-(h*100))/10; o=((num-(h*100))-(t*10)); [/CODE] i want to rewrite my code using loop and modulus operator.. help guys. thanks btw: i'm writing a program that converts numbr to w.ord-/. | |
Hello all, I am working on a Java project which uses mysql for database. I want to design code for a data loading module which will define database schema and consume actual data. I want to know whether there is any way to run this load data infile command dynamically? … | |
| Hi, I'm trying to create a single instance of a regex term. i.e. [CODE] boolean rProcessEndpoint = Pattern.matches("[http://]{1,1}", processEndpointInput); System.out.println(""+processEndpointInput); [/CODE] However, with this particular instance, you can type "http://http://" and it will return true. Here is my source of information: [url]http://www.dreambank.net/regex.html[/url] Here is where I test my regex: [url]http://www.regular-expressions.info/javascriptexample.html[/url] … |
Hi , //In this project, you’ll create a program that calculates a salesperson’s commissions using double-precision values, and displays the results. The commission rate in the first method will be entered as a decimal value (for example, a 7.5% rate will be entered as 0.075). I read javaAddict reply here … | |
hi: i'm trying to make a simple java program which can determine whether a number is odd or even. I am 100% Completly new to java and just started, and so I do not understand most terms and such, so my apologies for that. The Following code is wht i … | |
hi, how can I spawn another instance of a JVM complete with it's parameters without the need to construct OS dependent command lines? is there any class that helps me do that? thanks, johan | |
How can I align it properly? got hard time. sorry i'm just new in Java [CODE] public class MultiplicationTable { public static void main(String[] args) { int[][] multtable = new int[11][11]; System.out.print("*"); for (int a=1;a<=10;a++) { System.out.print("\t"+a) ; } System.out.println(" "); for(int i=0; i<=10; i++) { // this loop is … | |
Can someone please write a piece of code for the following and comment each line (except for really simple ones like int x = 5;) explaining what it does? Objective: write a program that "spins a number wheel" in the background while waiting for you to type "stop" -- when … | |
Output should be as show below: and files are attached. 1. Here is example output for input file electricity.txt: number of integers in file "electricity.txt" = 4 index = 0, element = 1877 index = 1, element = 1923 index = 2, element = 1879 index = 3, element = … | |
Hi everyone. I have a quick question: Is there anyway that you can check to see if a point lays on an Arc2D object? I'm trying to write a Physics library (or at least part of one), and I noticed that there is no method that does it. You can … | |
Hi friends what's a role of index in RMS? when we use index in RMS? plz I need your help. | |
The program cannot display the value which had assign to properly.The output is some weird texts.Why? [CODE] import java.util.ArrayList; class Employeee { private String name,department,position; private int idNumber; public Employeee() { name = null; position = null; department = null; idNumber = 0; } public Employeee(String n,String p,String d,int i) … | |
I m doing Program for sudoku. The blank grid displayed but how to pass random integer values to that grid. here is my code: [code=java]import javax.swing.BorderFactory; import javax.swing.JComponent; import javax.swing.JFrame; import javax.swing.JPanel; import java.awt.*; import javax.swing.JFormattedTextField; import javax.swing.text.DefaultFormatterFactory; import javax.swing.text.NumberFormatter; @SuppressWarnings("empty-statement") public class Board { private static final Dimension FIELD_SIZE … | |
Hi All I am trying to resize the button which is placed in a cell of GridBagLayout but FAILED...:( Like I want same size of every button (Please see the attached file for what I am getting as Output of my Program which is as follow - [CODE] import java.awt.GridBagConstraints; … | |
Dear all, Could anyone help me on finding all magic numbers using JAVA with 1000 iterations or less? Magic numbers are 6 digit numbers that have the property that they are equal to the square of the sum of two 3-digit numbers when it's high-order and low-order digits are separated. … | |
I'm using the drawImage(); method in Graphics2D to draw my png images. However, I'd like to be able to render them with screen blending. If it's possible, I'd really like to know how you do it, and if it's fast enough to be used real-time in games. I think I'm … | |
Hi friends... How can i put index on my records in RMS to increase the rate of RMS?? | |
i just can't figure out what's wrong with this. 1. suppose i enter 9-3-1991 as the birthdate, this should return 18. but it returns 17. //wrong 2. suppose i enter 2-9-1991 as the birthdate, this returns 18. //correct what's wrong with my code? [CODE=java] private static int ageCalc(int mm, int … | |
Hi there all I would like some help with my client and server program that uses gui to chat with each other. The program works fine the first time but somehow when i try to send a second message nothing gets displayed and the person object is empty. I dont … | |
Hi folks, i need some help on how to get this code to work properly: I have not had the time to fully commit to its intrinsics but i am sure there is someone in the community who can get me some quick help. Thanx.[code]package javaapplication1; import java.io.ByteArrayOutputStream; import javax.crypto.Cipher; … | |
i have this code. [CODE=java] numberPlayers = 2; players = new Player[numberPlayers]; setName(); setHand(); private static void setName() { for(int i=0;i<numberPlayers;i++) { out.print("Player "+ i + " name: "); players[i].setName(in.nextLine()); out.println(); } } private static void setHand() { for(int i=0;i<numberPlayers;i++) { out.print("Player "+ i+1 + " hand: "); players[i].setName(in.nextLine()); out.println(); … | |
I hav to do a project on online examination using java and j2ee concepts. I donno from where and how to start. I donno which concepts to use. Am not confident with the concepts. But am sure I can learn and do.. plz someone guide me to do the project. … | |
As you probably have heard, Oracle bought Sun for $7.4 billion today. I'm no Larry Ellison fan, because frankly, I think he's a few cards short of a full deck but I think in the long run, this is good for Sun. Not all of Sun but a lot of … | |
Everyone from techie bloggers to technical journalists to stay-at-home moms are talking about today's big news: [URL="http://www.ibm.com"]IBM[/URL] is trying to buy [URL="http://www.sun.com"]Sun Microsystems[/URL]. Big deal. What's in it for Linux? As a matter of fact, it is a big deal. And an even bigger deal for Linux. Sun owns MySQL, … | |
Make the necessary changes to the web-service project in the web.config file to make it accessible to the HTTP GET & POST calls. This is a simple Java program illustrating how you can consume the .NET web-service in Java program. import java.io.*; import java.net.*; public class WebService { public static … | |
With much fanfare Sun announced its new JavaFX platform yesterday, but curiously [URL="http://channelsun.sun.com/video/javafx -- do more!/3856260001"]in a video introducing the platform[/URL], Sun CEO Jonathan Schwartz, made the browser the enemy of content owners, and set up JavaFX as the platform to give developers and content owners direct access to users. … |
The End.