32,199 Topics

Member Avatar for
Member Avatar for Ann aiko

import java.awt.FlowLayout; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JTextField; import javax.swing.JComboBox; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JButton; public class OtakuHigh extends JFrame{ private JLabel label, label1, label2, label3, label4, label5, label6, label7, label8; private JTextField text1, text2, text4, text5, text7, text8; private JComboBox Mbox, Dbox, Sbox, Ybox, SCbox; private JButton Qbutton; …

Member Avatar for mKorbel
0
211
Member Avatar for trishtren

Hello, im currently working on a program to split a string based on symbols only, i need to seperate the string around the symbols whilst keeping the symbols as well eg. test_String_123_^; would result in an array containing : [test] [_] [String] [_] [123] [_] [^] However although i have …

Member Avatar for masijade
0
274
Member Avatar for bo_bon91

Hi everyone. I am just learning how to use servlets. I need to make a lotto application. I have this template: import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Collections; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class MyLottoServlet extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response)throws ServletException, …

Member Avatar for JamesCherrill
1
257
Member Avatar for bkhp

I am to have the user input a temperature and have the computer output which season it (probably) is based on the temperature entered. I have written this much and when I run the program, it seems to have the user enter the temperature in an input box and then …

Member Avatar for JamesCherrill
0
651
Member Avatar for Michal_2

Hello Guys, If I have a string "Registration 00DL5876 Make" is there a way to match the first word and the last ("Registration" & "Make") and than pass the substring "00DL5876" to seperate string ? how about "Primera SR 2.0 D Colour" if i want "SR 2.0 D" ? I …

Member Avatar for Seldar
0
120
Member Avatar for ganges

Hi, can you kindly provide me the list of essential jar files for both hibernate and spring(hibernate and spring integration) thanks for your time

Member Avatar for stultuske
0
58
Member Avatar for Akeem Amure

import java.awt.*; import java.lang.Math; import java.awt.event.*; import java.awt.Graphics; import java.applet.Applet; /* <APPLET CODE=draw.class WIDTH=600 HEIGHT=200 > </APPLET> */ public class draw extends Applet implements ActionListener, MouseListener, MouseMotionListener { Button bDraw, bLine, bOval, bRect, bRounded,bSelect1,bSelect2,bHeading; Point dot[] = new Point[1000]; Point start, end; int dots = 0; boolean mouseUp = false; …

Member Avatar for JamesCherrill
-1
1K
Member Avatar for mcoliver88

Hi so i have created this table for a sales person. class SalesSystem { //Sales Person One public void SalesPersonOne() { int i=0; System.out.println("Sales Person 1"); String newLineMark = System.getProperty("line.separator"); String leftAlignFormat = "| %-7s | %-9d | %-9d | %-9d | %-9d | %-9d | " + newLineMark; System.out.format("+---------+-----------+-----------+-----------+-----------+-----------+" …

Member Avatar for mcoliver88
0
207
Member Avatar for aqkill3r
Member Avatar for srikanth2321

Hi, I'm trying to wrap lines in Jtree nodes, I found this code which is working good for me but a with a minute defect. On selecting Jtree node, only second half of the text is highlighted in blue leaving first few characters, I tried a lot to fix this …

Member Avatar for srikanth2321
0
874
Member Avatar for MichaelCJ10

//I want to make a program so that i can move a pawn around a board. It only has 4 positions. I am wondering how i should //go about the action listener, as in should i check using a for loop? //The pawn begins in position 0 and depending on …

Member Avatar for stultuske
0
414
Member Avatar for xTurK

I have to complete this programming homework which consists of building a hangman game. However, the problem is: I do not know how to make it so that, when you guess a correct letter, it reveals that letter in the hidden word while still keeping the other parts of the …

Member Avatar for xTurK
0
321
Member Avatar for Ms

Hi, i need to program this algorthim using 2 stack in java, for example to evaluate such a given valid infix expression : (5*3)+(4/(6-2)). i need help, i don't know much about stacks.. Create two empty stacks, one for operands, and one for operators. Read infix expression as a string …

Member Avatar for Schol-R-LEA
0
272
Member Avatar for laolumichael

SELECT * FROM myTable WHERE columnId < 45; while (rs.next(){ result of row1 goes to row1.txt; result of row2 goes to row2.txt; result of row3 goes to row3.txt; result of row4 goes to row4.txt; }

Member Avatar for laolumichael
0
222
Member Avatar for Skotie44

Hello All I am writing this program which: - generates two random numbers -ask user to multiply them -checked users answer to see if its correct. - if not correct, asked the user to guess again I have everything working except the loop that is needed to have the user …

Member Avatar for JamesCherrill
0
319
Member Avatar for patel.jeel92

This is the code that I have so far but does not work. When called, the metod returns a pointer whose first and last points to null. The "given" linked list a linked list that we have to make using the add method from the inherited Linked List class. public …

Member Avatar for JamesCherrill
0
157
Member Avatar for blindislands

So I am using processing- similar to Java. I have made a button where I can add more ellipses (max 4) or press a different button to remove ellipses. I also made 4 different sets of keys for each of those ellipses to move. However, they can only move individually …

Member Avatar for JamesCherrill
0
173
Member Avatar for Violet_82

Hi all, I wonder if you can help me to understand this. I came across the following code: @Override public String toString() { return String.format( "hourly employee: %s\n%s: $%,.2f; %s: %,.2f", super.toString(), "hourly wage", getWage(), "hours worked", getHours() ); } // end method toString I have some problems with the …

Member Avatar for Violet_82
0
3K
Member Avatar for reincom

# Im trying to input 11 digit numbers but i got an error when parsing from string to int # JLabel lblMobile = new JLabel("Mobile No. :"); add(lblMobile); JTextField txtMobile = new JTextField(""); add(txtMobile); int CUSMobnum = Integer.parseInt(txtMobile.getText());

Member Avatar for JamesCherrill
0
185
Member Avatar for stackOverflow

Hi All, I'm trying to use jdbc connection with sqlServer 2000. I'm using j2sdk1.4.2. And i have service pack2. I've installed the .jar files mssqlserver.jar, msutil.jar, msbase.jar. I have these jar files in E:\j2sdk1.4.2_04\lib. I'm trying to connect with the following program. [CODE] import java.*; import java.io.*; public class Connect{ …

Member Avatar for stultuske
0
9K
Member Avatar for COKEDUDE

I would like to create an incremented variable by how many passes I go through my for loop. This is what I was thinking. I would like my variable to total with the pass number at the end. So the first pass would be total0, followed by total1, total2, total3, …

Member Avatar for stultuske
0
137
Member Avatar for mikewyatt

Hey.... I am just days away from completing a year-long project and want to convert the netbeans project to a stand-alone java program that can be installed on another system without netbeans. YEAH! Sorry - did my happy dance! the Program has a .main java file and about 15 other …

Member Avatar for mikewyatt
0
883
Member Avatar for mikewyatt

I am trying to change my database(s) from network to embedded. I believe that the driver is working and has found the database requested with the following code: try { // connect method - embedded driver String dbURL1 = "jdbc:derby:Databases/Armor"; Connection conn1 = DriverManager.getConnection(dbURL1); if (conn1 != null) { System.out.println("Connected …

Member Avatar for mikewyatt
0
4K
Member Avatar for 203428

hi all; How compute runtime of a spicifique programm? if i run same programm several time, in same enviroment, is the execution time will be frozen? i need some ideas,suggestions, explanations. Thanks.

Member Avatar for Gerbiler
0
68
Member Avatar for RWD_

Hi there, I'm currently a student in an intro to Java course at the college level. I've been doing well all semester, but I've ran into trouble with our latest lab. It's a bonus lab, so naturally the content wasn't covered in class. After playing around with what I found …

Member Avatar for JamesCherrill
0
711
Member Avatar for blue_Student

I want to have a changing output in the 2nd textfield that is 'output' in my Action class as I enter input in the 'input'textfield. I don't know why it doesn't give any output... pls help The comboBoxes convertTo---contains "IEEE" and "DEC" while precisions contain "Long", "Single", "Double". Any advice …

Member Avatar for JamesCherrill
0
238
Member Avatar for software girl

i have to calculate the MEDIAN of an unsorted array(i.e,array must be in sorted order before calculation of median).I am a beginner in java.kindly help me with some kinda code,and learn me how to calculate the median in this case?thankx

Member Avatar for JamesCherrill
0
738
Member Avatar for ZombieKnight93

This is the program we were assigned to do (Project: Emergency Response Class) The North American emergency response service, 9-1-1, connects callers to a local Public Service Answering Point (PSAP). Traditionally, the PSAP would ask the caller for identification information—including the caller’s address, phone number and the nature of the …

Member Avatar for ZombieKnight93
0
1K
Member Avatar for reincom

if(isource == txtFirstname){ try{ String searchHotelCustomer = "Select * from HotelCustomer where CUSFirstName='"+CUSFirstName+"'"; driver.selectQuery(searchHotelCustomer); ResultSet rsSearch = driver.rs; if(rsSearch.next()){ txtRoomNum.setText(rsSearch.getString("RoomNumber")); } } how do i get int value from text?

Member Avatar for Seldar
0
276
Member Avatar for Sockoiid

I was trying to install java JRE7 this earlier. I followed the instructions Mike 2000 17 linkedd in another linux thread. In the installation stage of the setup it said to put this into the terminal: sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java7-installer I did that and …

Member Avatar for iLikePHP
0
423

The End.