Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!

Hamad Sultan

Ranch Hand
+ Follow
since Mar 16, 2020
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
2
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Hamad Sultan

Respected friends;

Good day. I developed an desktop database application in JAVA swing by using netbeans.

Now i want to make install it on a client computer as the software install on a computer means make a installer which also install mysql server/ workbench.
How can i done this job? is JDK 1.8 also dilver with the package if yes how?

In short when my application starts to install it also install first Mysql,JDk which supports to run the application successfully.

Thanks

1 month ago
Hello Friends;
Good day. I am stuck from 2 days to pass the parameter in where clause like
SELECT
    maindata.`Id` AS maindata_Id,
    maindata.`Maincat` AS maindata_Maincat,
    maindata.`Subcat` AS maindata_Subcat,
    maindata.`location` AS maindata_location,
    maindata.`unit` AS maindata_unit,
    maindata.`oem` AS maindata_oem,
    maindata.`model` AS maindata_model,
    maindata.`serial` AS maindata_serial,
    maindata.`asset` AS maindata_asset,
    maindata.`rating` AS maindata_rating,
    maindata.`po` AS maindata_po,
    maindata.`details` AS maindata_details,
    maindata.`doi` AS maindata_doi,
    maindata.`manufacture` AS maindata_manufacture
FROM
    `maindata` maindata
where $P{Param1}=$P{VarLoc1}

If i pass the column name after where its works suppose WHERE UNIT=$P{VarLoc1}

NOW I WANT TO PASS THE COLUMN NAME ALSO WHUCH IS SELECT BY THE USER TO SEARCH THE SPECIFIC RECORD LIKE IF HE WANTS TO SEE THE DATA AGAINST COLUMN model .

but the above query is not working. I also use the $X {IN,Param1,VarLoc1} but all the column are varchar and both parameters are Java.Lang.String

Please guide me how i pass the column name in where clause?



Regards
1 month ago
Hello Dave;

Good day. I am new with that yes you are right about the XML file. But i do not know how to provide the value in where clause behind the action event. For example i write


Please guide me how i pass the parameter?

regards
2 months ago
Hello friends;

I know its a swing fourm. but here i post a question about Jasper report. In button action listener the following code run


The query in the xml file is


After run the query the report is empty and the POPUP show DOCUMENT HAS NO PAGE.

How i fix it?

Is there ant example or tutorial regarding how to use where clause to pass the value from the Java Combo box.

Regards
2 months ago
Hello Bob;

Great Thanks. I develop the application in netbeans. when i run the command CLEAN AND BUILD the following error shows. I am unable to resolve it. Please guide me why these lines occur.




And line 270 as follows


C:\Users\hammad\Documents\NetBeansProjects\Data_consilidation\nbproject\build-impl.xml:930: The following error occurred while executing this line:
C:\Users\hammad\Documents\NetBeansProjects\Data_consilidation\nbproject\build-impl.xml:270: Compile failed; see the compiler error output for details.


Please guide me how i fix it?

Regards
2 months ago
Hello Bob;

Thanks for advise but as i mention i am new in java am still stuck here. I change the code as you mentioned like this





I request you please give me a correct place of invokelater function with the above code.

Regards
2 months ago
Hello Friends;

I create a method to update the progress bar while the data from the database is fetching. I calculate the time it takes 30 seconds almost to populate the comboBoxes. At the same time progressbar thread starts but when method execution complete then progress bar starts to paint. why?



How i fix it or any other advise to do this task?

Regards
 
2 months ago
Thanks Paul;
Great. I am Thankful to you.
Sir now i want a best advise from you on the following matter. My application have 5 categories combo boxes are populate from the database.

Now i am reaching to make a final data entry form. I have two options
1. Use Combo and text boxes on the panel and save the record to the database. By this user insert record to database one by one. If operator needs any category which is not available in respective combo it opens related form and add new category and then back to data entry form and refresh the combo and starts to enter data.
2. But i have an idea if i make a JTable  and add combo boxes in it. Column A,B,C,D,E. Suppose at Row 30 the user need to add an category at Column B Combo , It opens the related category form add it. Now he return to the JTable at row 30 how he refresh the only combo at row 30 while the above 29 values already found ok.

If i refresh the combo with an GUI button then all the combos above line 30 also refresh and selected items are changed.Is there any way to just refresh the specific row combo with update data.

Whats you suggest for me?

I am waiting for your value able suggestion.

Regards
Hello Paul;

How i add Row Numbers in first column, The other two column from Database.

I am not good with JTable. Please help me howi fix it?

Regards
Hello Paul;

Please help me with the line of code.

Thanks
2 months ago
Hello friends;

Good day. I want to add custom row numbers in JTable at first column. Here is my code for update the table from mysql database.



how i fix it?

regards
2 months ago
Hello Friends;

Good day. I face some problem and when database connection try for the connection the following exception generate:
"The server time zone value 'CDT' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the 'serverTimezone' configuration property) to use a more specifc time zone value if you want to utilize time zone support."

While i use the remote database and the parameters are
class1=com.mysql.cj.jdbc.Driver
USER1=mycompas_turbine
PASS1=1111
URL1=jdbc\:mysql\://some address\:3306/mycompas_info


Class.forName(class1);
conn1=DriverManager.getConnection(URL1,USER1,PASS1);

How can i fix this issue? On the server where mysql install is not a dedicated server for me. I just pay for a domain and install mysql and configure it through CPANEL.

How i add the time zone in DriverManager.GetConnection(URL1,USER1,PASS1+???);

I live in Pakistan please help me how i fix it?

Regards
2 months ago
Hello Friends;
I am developing an application with the help of net beans 8.2.
I design some frames and J Internal frame with buttons and labels. at that time i set the METAL look and feel. When i switch it to MOTIF look and feel the component size and placing are changed. i know all look and feel have their impacts.

But my question is that how i set the look and feel in net beans and then design the forms according to this. I search the internet they shows only preview design option.

But i want that net beans should set desired look and fell and then start to design the component layout.

please help me how i fix it

Regards
2 months ago
Dear Paul/Friends;

Now i conclude that the only those parameters of turbine send to Domain database which is required to manager to evaluate it.

So guide me what is the best option between following:
1. first save the data to the excel sheet and when internet connection available send it to domain database after successfully the records on the excel sheet will be deleted and save new records ?
2. Second one is save to localhost and then send to domain and delete that records after insertion.

What you guys suggest?

Regards
Hello Tim Holloway;

How it is done from the front end means from the GUI? " I think that in that case, I'd dump the data to SQL, upload it to the cloud server, and then run the mysql command to import the SQL. "

Please give me an example.

Regards