32,204 Topics
| |
hi, i m very new here and also in programming world. i tried to make a program that prints happy and unhappy numbers. but that prints only unhappy numbers and then it goes back to while loop where j remain 0. how can i fix the problem? plz someone help … | |
Itry to move text in tTextarea to left or to center or to right by pressing to buttons i did like this but unfortuantly it is not work . [CODE] public void actionPerformed(ActionEvent e) { if(e.getSource()==buttons[0]){ area.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT); } if(e.getSource()==buttons[2]){ area.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } } [/CODE] area if an object from JTextArea can … | |
I'm working on a project in which i have to use J2ME. I've tried a few tutorials but they seem only to be especially oriented to specific problems, and in my programming experience i've learned that's always better to globally know your environment. If anyone knows an e-book (or book) … | |
Hi, I am very new to Java and am using Breezy Swing. I basically need to create an array of JButtons (26 in total) and display them on a form (9 on the top row, 9 in the middle and 8 on the bottom) and I have no idea of … | |
Good Day, I am using an Ms Access Database to design a StockTracker applicaton. The application is used to check the stocks of users. Firstly I need to sign on as an administrator and then be able to add users and their stocks to the database. I have created the … | |
hi there, how can I change string to xml and vise verse in java, in addition how can I add values to xml according to element name , I can imagine something like "setValue(elementName, the value) ; as we are using in java, any suggestions any help , please! thanks … | |
I wrote a program to write data in a text file to another text file .what i want to do is to open that modified second text file once I've entered data in to that | |
i wanted to print random line from a file. i knows how to print out the whole file but doesnt know how should i do to print a random lines from a file!!! hope someone can give me some ideals or an example. thanks! | |
Howdy, recently I saw something very strange popping up in my catalina.out log files. Where I used to see a class name and line number for the exception I now see "Unknown Source". Does anybody have any ideas why that happened? I need to get the class name and line … | |
Java vs .NET Which platform is better according to your opinions, Java or .NET, Post your reply here | |
Hai friends, How to send and receive mail from my gmail account through java program.is there any way to access? | |
| Hey guys, In Java, there is a method called substring, but what substitute does it have in Python, or do I have to explicitly do it like: [CODE] s=raw_input("Enter a sentence: ") s2="" a=0 b=0 for a in s: if(a==' '): s2= s[b:a] b=a a+=1[/CODE] Thanks guys! |
I have just made a banner in java applets and in status window also i have used a banner but in reverse direction to that of the other banner but the banner in status window does not make use of the whole space of the window and just runs in … | |
Hi Every body Good Day with u.... Help..me for How to find the details like IP, username, any updationby him of the visitors visit my webpage in java | |
hi all!i have problem to show JPanel in netbean with button here's the code [code=java] private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed NewJPanel x = new NewJPanel(); x.setVisible(true); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 30, Short.MAX_VALUE) .addComponent(x) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 30, Short.MAX_VALUE) .addComponent(x) ); [/code] my question how … | |
Q: Write a program that will determine if a number is even. The program should ask for a number, say X and printout whether "X is even" or " X is not even". This program must use a method with the signature "public static boolean isEven(int i)". | |
Respected mem, I m struggling to make a project on inventory management system. Which has 5 option on first screen.I will tell u later the remaining. Can u plz. help on this project. | |
Hi All I want to check whether there is a record present in my database with value: StartDate="Todays's Date" where start date is the column name with datatype DATE. | |
Hi all, I hope you are well. I am trying to explain some code to a friend : [CODE]StringConcatenate StringConcatenate1 = new StringConcatenate(); StringConcatenate1.stringConcat(); [/CODE] I said that this code creates an object "StringConcatenate1 " of type StringConcatenate and executes method stringConcat() (which is from class StringConcatenate()) on object StringConcatenate1. … | |
Hi, I was wondering if any one can help me with returning a array element to the main function. The array list will be the main function. I want to send the array list to a method that adds a element to that list and then send it back to … | |
hi, Well i am planning to develop the chatting application peer to peer as front end tool java so please guide me how the data will flow? | |
Hi All, I need information of a better Java hosting service (better in terms of performance, security, storage, reliability). So if any of you know such kind of service provider thn kindly let me know ASAP. It would be great help from your side. :) Thanks, Priti | |
Hello everyone, I am doing a project in which one requirement is to play a sequence of audio files..can someone help me with this please...i am really running out of time i just have 1 month to finish my project... | |
Hi, I need the solution to the below mentioned problem: A Scroll Banner is an applet which displays 2 scrolling messages across the applet’s Window. Since the scrolling of a message is a repetitive task, it is performed by a Separate thread, created by the applet when it is initialized. … | |
import java.util.*; class FindString { public static void main(String arg[]) { Scanner ob=new Scanner(System.in); String st="I am a student, you're also a ."; String search; String st2=""; String st3=""; int i,c=0; System.out.println(st); System.out.println("Enter your word to search: "); search=ob.next(); do { i=st.indexOf(search); if(i!=-1) { st2=st.substring(0,i); st2+=st3; st2+=st.substring(i+search.length()); c=c+1; st=st2; } … | |
I am currently doing a project on LR Parsers and need to code the algorithm using Java. The code should use the parse tables and determine wheather a word is accepted using the grammar provided and using the Parser tables. I am stuck on where to start so any advice … | |
Hi, I am having problems in accessing the value of a string variable (string1 here). It is working in one way when i put it inside constructor:- [CODE] public class Demo1 extends JFrame implements ActionListener, ItemListener public string string1; Demo1 { Action a1 = new AbstractAction("Some Action") { public void … | |
Hey there everyone. I David. I am have a problem with the end of line keystroke ( Ctrl+Z ) in the Netbeans and JBuilder Compiler, when I press the buttons simultaneously nothing happens but when I do it in Eclipse it works fine. Here is a look at the code.Help … | |
Hello, I am trying to read in a tab delimited text file. Most lines in the file are in the following format: [CODE] Col1 Col2 Col3 data1 data2 data3 data1 data2 data3 [/CODE] But some lines are missing the first value: [CODE] Col1 Col2 Col3 data1 data2 data3 data2 data3 … |
The End.