So my problem is that I've written a function that takes two Doubles, two Int, and a Calendar object on Android (Java). I believe the class provided to allow it to run in a separate thread, AsyncTask, accepts only one type of Object (but allows multiple) as an argument so I figured I might be able to put it in a List or a LinkedList or s...
I have a JTextPane (or JEditorPane, I can use either no problem). How can I change the font of a selected area to a specific font?
textpane.getSelectedText().setFont() won't work. (Even with font-family)
...
Hi,
I need code in java for Excel to XML conversion.
where Excel sheet will be used as the input file and XML file as the output file.we have to read the Excel file Row and column wise and than write that data to XMl file.
please anybody give any Code or URL or any Repository of example,which would be appreciated.
Thanks,
Mishal Shah...
in mysql i have two tables
tableA
col1 col2 SIM1 ..........col24
-----------------------------------
a x 1 5
b y 1 3
c z 0 2
d g 2 1
tableB
colA colB SIM2
-------------------
x g 1
y f 0
x s 0
y e 2...
I'm using java.text.SimpleDateFormat to parse strings of the form "yyyyMMdd".
If I try to parse a string with a month greater than 12, instead of failing, it rolls over to the next year. Full runnable repro:
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
public class ParseDateTest {
pub...
in mysql i have two tables
tableA
col1 col2 SIM1 ..........col24
a x 1 5
b y 1 3
c z 0 2
d g 2 1
tableB
colA colB SIM2
x g 1
y f 0
x s 0
y e 2
i am using java program to connect to mysql database u...
I have a query, when im using multiple Aspects in my aop.xml. here's the problem. i have defined some <include> and <exclude> in my <weaver>. i have 3 aspects in my aop file. i need to define a specific <include> and <exclude> for each aspects. how it is possible. Thanks in advance.
...
Hi Experts,
I want to create a text editor (using java/swing) like notepad. For this I need the implementation of saving file. mean if the user clicks on "save" first time then the dialog should appear for taking file-name, file-extension. But if he clicks again on same "save" button then the file should save without appearing the "save...
i am creating a csv by using "INTO OUTFILE" statement for a mysql database. the database is huge 0.4 million records. i am using java program from eclipse to connect to mysql database and give this OUTFILE query. sometimes after running the query from program i do not want to wait for the whole query completion.so i terminate the java pr...
I have a web.xml which looks like:
<web-app>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<security-constraint>
<web-resource-collection>
<web-resource-name>Default</web-resource-name>
<url-pattern>/</url-pattern>
</web-resource-collection>
<auth-constraint/>
</security-constraint>
...
i have two mysql tables
tableA
col1 col2 SIM1 ..........col24
-----------------------------------
a x 1 5
b y 1 3
c z 0 2
d g 2 1
tableB
colA colB SIM2
-------------------
x g 1
y f 0
x s 0
y e 2
...
I have a todo list type application that stores all of the note data in a sqlite3 database. Each activity in the application needs access to the database to edit different parts of the data in real time.
Currently, I have each activity open its own DBManager object (the helper class I created to manage the database). This is causing p...
In files.jsp I am using following anchor and JSTL c:url combination -
<c:url value="downloadfile.jsp" var="dwnUrl" scope="request">
<c:param name="fileType" value="PDF"/>
<c:param name="fileId" value="${file.fileId}"/>
<c:param name="fileName" value="${file.fileName}"/>
</c:url>
<a href="${dwnUrl}">Download</a>
On downloadfile...
Is there any way to detect a cell selection change in a JTable? I've found documentation for detecting a row change using ListSelectionListener but it doesn't seam to work when changing selection on the same row. I'm using JTable to render a simple schedule.
Maybe I should use a different component?
...
I am new to jdbc and i'm try to connect to by database form IDE.The code below is what i wrote;
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
try {
DriverManager.registerDriver(new org.apache.derby.jdbc.ClientDriver());
Connection conn=DriverManager.ge...
Hi,
I have some years experience with swing and feel comfortable that I understand the architecture.
Now I need to get up to speed on SWT rather quickly.
What would you recommend I study from online sources or books so I can get my head around the SWT architecture quickly ? I'm really starting from scratch.
...
I am connecting to a MySQL database using Java. I am executing this query:
String query =
"SELECT * FROM TT2 " +
"INNER JOIN " +
"`Language Pref` " +
"ON tt2.msisdn = `language pref`.MDN " +
"INTO OUTFILE 'c:/test12226.csv' " +
"FIELDS TERMINATED BY ',' " +
"EN...
We're building J2ME "data collection" applications for the Nokia S40 series of cellphones (and possibly Android platforms).
I was wondering how other mobile developers learnt J2ME ? What were the roadblocks or bumps which slowed your progress ? What gotchas should I be watching for? Where did you learn the techniques for going beyond th...
I use Hibernate MySQLInnoDB Dialect to generate DDL's.
hibernate.cfg.xml :
<property name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
How can I configure the character-set/Collation to 'utf8_general_ci' for the generated table?
...
I am using Maven 2 to build my Java project and I am looking for a way to present the current version number of the pom.xml to the user (using a Servlet or JSP for example).
As far as I can see, the best way would be that Maven packages the version number as a text file into the WAR. This allows me to read the version from that file and...