i want to create a form for my client. My client require to create a dynamic for him. suppose, i want to insert 1 record in main table of mysql, and record multiple records in secondary table which has reference key of main table. I dont know how many records against the main table, it maybe one at time or multiple records at time. I want to do it with single form. If client click add more button it show another text field to insert more data. how i can do it ?????

Member Avatar
Member Avatar
+0 forum 8

Hi everyone, Does anyone have an idea of how to skip a line in a JTextField? In System.out.println, I would normally type n but it didn't work for me when I used it in a textfield: text1.setText(**"n"**+coloumn[counter]); where the output displays well as desired excpet that it doesn't skip a line.(Forget about the actual line of code since there is a loop so multiple values are expected in a new line each). The fact is that I need to know how to skip a line. Thanks. By the way, this is the full program: import javax.swing.JFrame; import javax.swing.JOptionPane; import java.awt.event.*; …

Member Avatar
Member Avatar
+1 forum 2

Hi everyone, I'm working in a project where its required a dynamic insertion of a grup of 3 textfields where one hiels dates. So far I manage to do the insertion part, but Im still with the problem of jquery datepicker only working right on the first(original) textfield. I notice an error when inserting new textfield and trying to access the jquery datepicker "Uncaught TypeError: Cannot read property 'append' of undefined"! I searched the web and i found that it can ve fixed by creating a class on the textfield and adding "'removeClass' or the 'not' ". $('.datepicker').removeClass('hasDatepicker'); I tried …

Member Avatar
Member Avatar
+0 forum 5

Hey Guys, I am working on a search that takes in a value via textfield. Once taken in it should display another Jframe with the info but the searchbox crashes the second I run it. Its some stupid mistake I have made or i have gone about it the wrong way but at this stage my brain is fried from lookin at this code and i am not making any head way. The search box Code: import com.sun.rowset.JdbcRowSetImpl; import java.sql.SQLException; import java.util.logging.Level; import java.util.logging.Logger; /** * * @author Joe Lyons */ public class BB_Value_SearchBox extends javax.swing.JFrame { /** * Creates …

Member Avatar
Member Avatar
+0 forum 3

Hello to everyone, I´m having problems on retrieving data from mysql to a textfield in html, the data appears with queston marks inside of a "black diamond"! I researched and followed the steps like putting the database charset utf8, the table too! When I insert for example Alimentação its goes to the database like this and when i show it with a table made in php! but when i try do retrieve the data to another php page into textfields in html code, it substituts ção by queston marks inside of a "black diamond". When, again, I put this code …

Member Avatar
Member Avatar
+0 forum 1

hi i have been working on my project to create a store and i have to add items and sell items, and once i add items i store them into a textfile separated by commas, and i made the add item button work perfectly but i am having trouble with the sell button. import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.io.BufferedReader; import java.io.FileOutputStream; import java.io.FileReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintStream; public class text_feild implements ActionListener { JPanel titlePanel, buttonPanel; JButton button, Sell_button; InputStreamReader input_stream = new InputStreamReader(System.in); BufferedReader read_Buffer; FileOutputStream file_out_put; PrintStream print_stream; FileReader read_from_file; …

Member Avatar
Member Avatar
+0 forum 3

Hello Friends, I want to set the length of the textfield in java... Please check my below code....it works finely if I press the keys one by one slowly... But suppose if I press any key for a longer time the actual length exceeds and so the validation is not done correctly... Can anyone help me to set the length?? public class TextValidation extends KeyAdapter { public void keyReleased(KeyEvent key) { Object txt=key.getSource(); if(txt==txtPatientId) { char ch=key.getKeyChar(); String specialchar="!@#$%^&*()~?>'<:{}|+_/\".,;'][=-` \\"; if (txtPatientId.getText().trim().length() <= 10) { if (specialchar.indexOf(ch)>-1) { JOptionPane.showMessageDialog(null, "SPECIAL CHARACTER IS NOT ALLOWED","Title",JOptionPane.WARNING_MESSAGE); txtPatientId.setText(txtPatientId.getText().substring(0, txtPatientId.getText().length()-1)); } } else { …

Member Avatar
Member Avatar
+0 forum 5

I need to have a update button to update a edited textfield and save it to the database. I have created the button but have no idea on how to make it update the edited textfield and update the SQL database automatically. Pls help!!): This is my code: [CODE]private JButton getJButtonUpdate() { int centralize_width = (screenSize.width/2) - 150; if (jButton_Update == null) { jButton_Update = new JButton(); jButton_Update.setText("Update"); jButton_Update.setLocation(new Point(centralize_width, 300)); jButton_Update.setSize(new Dimension(150, 30)); jButton_Update.setHorizontalTextPosition(SwingConstants.CENTER); jButton_Update.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { System.out.println("Moving on to Existing Panel!"); if(Selected != null) { JPanel panel = new Case_Details(frame, Analyst_ID, Selected); frame.getContentPane().removeAll(); …

Member Avatar
Member Avatar
+0 forum 14

I am writing a Java program, a MP3 Manager, but I have problems to work with buttons, TextFields, and TextArea. Here are the problem descriptions. Create a class MP3 with instance variables for: artist, song, album, track length (in seconds). Provide a constructor, get/set methods, and a toString. method. The toString method should convert the track length into minutes and seconds. For example, 265 seconds would be displayed as 4:25. Create a class MP3Manager that extends JFrame with the following: a JPanel with a GridLayout that contains 4 labels, 4 textfields, and 4 buttons. This will be added to the …

Member Avatar
Member Avatar
+0 forum 35

hello all I have one textField and one textArea. How to move the cursor to the end of Text of TextArea when -cursor is in textField,and keyboard [Enter] pressed thank you denny

Member Avatar
Member Avatar
+0 forum 4

i m trying to update a table in my sql database using stored procedure. i have executed my stored procedure and dat works fine, no problem in that. i knwo because the values are updated when i execute it. however when i try to do so through asp.net code that i have created, it doesnt update in the table plus it doesnt show me any error, all it does is displays the previous values as it was. can someone tell me wat d error cud be. my code is given below: [CODE]using System; using System.Collections.Generic; using System.Linq; using System.Web; using …

Member Avatar
+0 forum 0

Hello Lovely People, Please have a look at my GUI first, before reading the rest (I've attached a picture, see at the end of my post). I'm having two problem with this GUI. 1) I don't want my Start button to be as long as it is. I want it to be about the half of if its current size and at the centre (as it is). how do I fix this? 2)As you can see, my text fields are quiet big as well. I would like to shorter both, in height and length (it should have enough room for …

Member Avatar
Member Avatar
+0 forum 4

I made a simple application that have a combobox which is loaded with database value and a textfield which should display text related to combo box selection. Name Number number1 1234 number2 2345 number2 5678 number3 2212 So combo box will have values number1, number2, number3. when user selects number1, i have to load textfield value with 1234 and if number2 is selected 2345,5678. Below is my code which retrieves from database ... but problem is the value is loaded only when i press enter key instead of clicking submit button... [CODE]<head> <title>Sample Numbers</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body …

Member Avatar
Member Avatar
+0 forum 2

Let's say, user input on prompt is 1 so JavaScript will create one textfield. We'll test Assess() if its working. Type "1" on textField and click "Assess" button. No alert message appears. Please help. Thanks in advance. [CODE]<html> <head> <title>JavaScript</title> <style type="text/css"> font{ color:#663300; font-variant:small-caps; font-family:calibri; font-size:15; } </style> <script type="text/javascript"> var n = '\n'; var inp; do{ inp = prompt("Number of inputs to assess." + n + n + "Maximum of 10.");//asks user how many input will the program assess }while (inp > 10 || inp <=0); document.write("<form name=\"myForm\" action=\"\"><font>"); var txt1 = "<input type=\"text\" name=\"t>"; var txt2 = …

Member Avatar
Member Avatar
+0 forum 1

The End.