|
|
what is the code for collecting the information from the ms access database and display in the applets
|
|
|
|
|
|
Am new to java tables in need of a code that can create the following interface of a message display board
|
|
|
|
|
Member 10683102 wrote: the following interface There's nothing following your first sentence.
Apart from that you usually write an interface manually.
|
|
|
|
|
|
I am working in spring MVC project where I need to use jsp form to connect to database. we are using signupservice.java to map the form values to database. I have attached the coding here. I have set the values for firstName and lastName but I want the signupservice.java take the form value instead of assigned value.I tried to change the coding but it is not working.Can anyone suggest me Where I went Wrong????
public void registerStudent(StudentVO studentVO){
System.out.println("*******Student userName*******"+studentVO.getUserName());
studentVO.setFirstName("firstName");
studentVO.setLastName("lastName");
studentVO.setValidationID("VID");
studentVO.setBirthDate(new Date());
studentVO.setGender('M');
studentVO.setGradeLevel(2);
studentVO.setRewardPoints("rewardPoints");
AddressVO addressVO = new AddressVO();
addressVO.setStreetAddress("streetAddress");
addressVO.setCity("city");
addressVO.setState("st");
addressVO.setEmail("email");
addressVO.setZipCode("zip");
studentVO.setAddressVO(addressVO);
Student student = new Student();
student.setUserName(studentVO.getUserAccountVO().getUserName());
student.setFirstName(studentVO.getFirstName());
student.setLastName(studentVO.getLastName());
student.setValidationID(studentVO.getValidationID());
student.setDateCreated(new Date());
student.setBirthDate(studentVO.getBirthDate());
student.setGender(studentVO.getGender());
student.setGradeLevel(studentVO.getGradeLevel());
student.setRewardPoints(studentVO.getRewardPoints());
Address address = new Address();
address.setStreetAddress(studentVO.getAddressVO().getStreetAddress());
address.setCity(studentVO.getAddressVO().getCity());
address.setState(studentVO.getAddressVO().getState());
address.setEmail(studentVO.getAddressVO().getEmail());
address.setZipCode(studentVO.getAddressVO().getZipCode());
address.setDateCreated(new Date());
student.setAddress(address);
UserAccount userAccount = new UserAccount();
userAccount.setUserName(studentVO.getUserAccountVO().getUserName());
userAccount.setUserRole(studentVO.getUserAccountVO().getUserRole());
userAccount.setPassword(studentVO.getUserAccountVO().getPassword());
userAccount.setDateCreated(new Date());
student.setUserAccount(userAccount);
this.studentDAO.registerStudent(student);
}
}">
modified 31-Mar-15 16:58pm.
|
|
|
|
|
program:
import java.sql.;
import java.io.;
import java.lang.*;
class CreateTable2
{
public static void main(String args[])throws Exception
{
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("jdbc:odbc:si83","SYSTEM","pass");
Statement st=con.createStatement();
String qry="create table sai(eno int primary key,ename varchar(10),sal double)";
st.executeUpdate(qry);
con.close();
}
catch(ClassNotFoundException e)
{
}
}
}
modified 31-Mar-15 12:14pm.
|
|
|
|
|
You don't know if the program worked since you have ignored any exeception that may have occurred.
|
|
|
|
|
how to create italic font in document word using java netbeans?and what is different apache POI and Apache ATKI in netbeans?
|
|
|
|
|
Member 11562051 wrote: how to create italic font in document word Read the documentation for the various settings that can be applied.
Member 11562051 wrote: what is different apache ... Google will help you.
|
|
|
|
|
Hello,
I have to make a small auction app as an exercise but Im lacking knowledge. If there's anyone who wants to earn some money by helping me let me know.
The application has to be like an auction for people to bid on cars.
Leave me a pm for more info.
thanks
|
|
|
|
|
This is my code inside the method:
@Post
public static String getDetails(Representation entity) throws Exception {
String customerId = getQuery().getValues("cus_id");
}
I use this code in Restlet Representation. I try to get the value from the Request API. But I am facing the problem as "Cannot make a static reference to the non-static method getQuery() from the type Resource". Please help me to solve this.
|
|
|
|
|
|
I have to call the method having @Post annotation that is inside the Class that extends the ServerResource. Please help me to clear this issue.
|
|
|
|
|
Hi All,
Anyone could you please explain me how to implement the Rest API which is like
"http://localhost:8080/www.example.com/{ping}/{hello}"
And how to implement in Java where the class extends ServerResource.
Regards,
Geetha.
|
|
|
|
|
|
how to create a chart from a database in android eclipse ..
Thanks.
please I'm the project as an example
thanks ...
from Indonesia
modified 25-Mar-15 5:20am.
|
|
|
|
|
|
|
1. Learn basics of java
2. Learn basics of databases
3. Learn basics of eclipse
4. Learn basics of access database via java.
5. Design application
6. Find java library that does charts. Learn how to use it.
7. Write application
8. Learn basics of Android programming
9. Learn basics of 'using' database on Android
10. Write Android application.
Step 9 might actually involve learning serving programming which involves several other steps.
|
|
|
|
|
You missed step 0: don't post the same question in four places on the same site!
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I wrote some code to insert custom annotations into a TIFF file, but I am having two problems.
First, the annotation description does not appear to be written correctly to the TIFF file, though the value is fine. I used AsTiffTagViewer to inspect the file, so it is possible that program does read descriptions for custom metadata.
Secondly, and this is more important, the exact same code does not work on Linux (runs w/o error but the annotations are not written). It runs fine on Windows 7. Below is a list of the jar files I have tried adding to the class path:
imageio-ext-tiff-1.1.10.jar
jai_codec.jar
jai_core.jar
jai_imageio-1.1.jar
mlibwrapper_jai.jar
Any help w/ these two issues would be appreciated. The code is below (assume a multi-page TIFF with 3 embedded images).
Thanks in advance!
Doug
package consoleapp;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.FileInputStream;
import java.util.ArrayList;
import java.util.List;
import javax.imageio.IIOImage;
import javax.imageio.ImageIO;
import javax.imageio.ImageReader;
import javax.imageio.ImageWriteParam;
import javax.imageio.ImageWriter;
import javax.imageio.metadata.IIOMetadata;
import javax.imageio.stream.FileImageOutputStream;
import javax.imageio.stream.ImageInputStream;
import com.sun.media.imageio.plugins.tiff.TIFFDirectory;
import com.sun.media.imageio.plugins.tiff.TIFFField;
import com.sun.media.imageio.plugins.tiff.TIFFTag;
import com.sun.media.imageio.plugins.tiff.TIFFTagSet;
public class TIFFAnnotator3 {
public static void main(String[] args) throws Exception {
FileInputStream fis = new FileInputStream("/tmp/input.TIF");
ImageInputStream iis = ImageIO.createImageInputStream(fis);
ImageReader imageReader = ImageIO.getImageReadersBySuffix("tiff").next();
imageReader.setInput(iis);
FileImageOutputStream fos = new FileImageOutputStream(new File("/tmp/output.TIF"));
ImageWriter imageWriter = (ImageWriter) ImageIO.getImageWritersBySuffix("tiff").next();
imageWriter.setOutput(fos);
int imageCount = imageReader.getNumImages(true);
for(int j = imageCount - 1; j >= 0; j--) {
BufferedImage image = imageReader.read(j);
IIOMetadata imageMetaData = imageReader.getImageMetadata(j);
TIFFDirectory dir = TIFFDirectory.createFromMetadata(imageMetaData);
List tags = new ArrayList();
TIFFTag tag1 = new TIFFTag("FirstName", 65001, TIFFTag.TIFF_ASCII);
tags.add(tag1);
TIFFTag tag2 = new TIFFTag("LastName", 65002, TIFFTag.TIFF_ASCII);
tags.add(tag2);
TIFFTagSet tagSet = new TIFFTagSet(tags);
dir.addTagSet(tagSet);
String[] tag1values = new String[1];
String[] tag2values = new String[1];
switch(j) {
case 0:
tag1values[0] = "Arthur";
tag2values[0] = "Dent";
break;
case 1:
tag1values[0] = "Ford";
tag2values[0] = "Prefect";
break;
default:
tag1values[0] = "Zaphod";
tag2values[0] = "Beeblebrox";
break;
}
TIFFField field1 = new TIFFField(tag1, TIFFTag.TIFF_ASCII, tag1values.length, tag1values);
dir.addTIFFField(field1);
TIFFField field2 = new TIFFField(tag2, TIFFTag.TIFF_ASCII, tag2values.length, tag2values);
dir.addTIFFField(field2);
ImageWriteParam iwparam = imageWriter.getDefaultWriteParam();
IIOImage img = new IIOImage(image, null, imageMetaData);
if(j == imageCount - 1) {
imageWriter.write(img);
} else {
if(imageWriter.canInsertImage(0)) {
imageWriter.writeInsert(0, img, iwparam);
}
}
}
iis.close();
fis.close();
fos.flush();
fos.close();
imageWriter.dispose();
}
}
|
|
|
|
|
You need to provide more information about exactly where the error lies, what information should be written to the file and what is being written.
|
|
|
|
|
Thanks for your response. As I said, there is no exception thrown in the code ("runs w/o error"). The problem is that the custom metadata isn't being written to the destination file (output.TIF). In the example above that would be the FirstName and LastName ("Arthur Dent", "Ford Prefect", "Zaphod Beeblebrox"). Sorry I wasn't more explicit.
|
|
|
|