Gaios Augustus

Ranch Hand
+ Follow
since Jun 01, 2018
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Gaios Augustus

Dave Tolls wrote:What does your AsyncTask look like?
How is it called?



Well I removed it completely as I didn't know how to get it work, it always returnet me NULL object.
5 years ago
I am trying to get JSON from RPC and I am keep getting error:



I found out that application is crashing at line:




Full code looks like:



I tried to put it in Asynctask but I didn't know how to do it, all attempts failed.
5 years ago

Knute Snortum wrote:You would need to create "getter" methods for your fields in Class2, like so:
Then you could use them with a Class2 object:
Also note that variables should start with a lowercase letter.



I must be doing something wrong but I still didn't make it work, tought it would be much easier to return parameter from GUI to GUI in JAVA.
Now I am  thinking to use text file as "Temp" and on return from Class2 to Class1 read variable from text file (Not best solution but should do a trick).
6 years ago
Thank You for Your replays.

How should I call GUI class and return selected parameter from it?
What method should I use for that?
6 years ago
Well I am not sure, I know that when I am calling another GUI class I do it like that so I tought I am sendig parameters in first line and than I am setting it visible with returning parameter.

How shouold I call it to send 2 parameters and return one into integer?



6 years ago
Hey all,

There is something that bother me.

I am working in NetBeans and JAVA Swing.

I have 2 classes ("Class 1" and "Class 2"). Both of classes has "GUI".
So I want when I click on label in "Class 1" call "Class 2". "Class 2" will on bottun click return some parameter. I am also sending some parameters from "Class 1" to "Class 2".

Class 1 call Example:



Class 2 Example:




In class1 I am getting error on line:



incompatible types: void cannot be converted to int



So in the Class2 I add "int":



So when I click on button in class2 it will populate myTempID and return it.

But now I am getting error on 2 lines in Class1:



constructor TipOpreme in class TipOpreme cannot be applied to given types;
 required: no arguments
 found: Connection,int
 reason: actual and formal argument lists differ in length






incompatible types: void cannot be converted to int



I am not sure what am I doing wrong?
6 years ago
I am sorry for 3 posts in row, I am not able to edit (Or I don't know how) posts to add updates.

Anyway, here is solution:

6 years ago


This is the part of code that make "doubles".  Now it is time for me to find out how to fix it .
6 years ago

Rob Camick wrote:

Thank You for suggestion, tried that but still same error.



So then you still haven't told us the statement that is causing the problem!!! How do you expect us to help?

I noticed that everything is executed twice



So you have a bug in your code somewhere. Time to do some debugging.



Yeah, sometimes when You write it down it is easier to notice the problem. Best way is to tell someone about it and it is easier find it.

Anyway, as soon as I find something useful, or solution, I'll post it.
6 years ago

Rob Camick wrote:

So get rid of the




Thank You for suggestion, tried that but still same error.



I noticed that everything is executed twice, even when I limit it with for loop, so I can't find reason why is that, I guess that the first time is executed and than it is trying execute empty SQL query, but it still should execute same query twice without any problem as it is only select.

6 years ago

Campbell Ritchie wrote:

Josip Skako wrote:. . . I'll describe it more precisely. . . .

Does that tell us where the exception was thrown? Please answer RC's question.



As I tracked it down I think it break at:



And I tried many ways to clear table and still always break there. So I am not sure is there problem at all and why it breaks.
6 years ago

Rob Camick wrote:Well we have no idea which statement is causing the Exception, so how do you expect us to help?



Yeah, sorry, I'll describe it more precisely.

This is betting application where I generate random "games" trough Microsoft SQL script (Random time).
When user run software it checks if there are games for that day in SQL Table, if not generate them for next 7 days.

Than user is coming to Login\Registrate screen. After successful login I have 4 jtables (Soccer, Basketball,...) that are filled up with selected data (SQL code).




So "CALIzb.main" is calling new class that is working with SQL queries:



And the " //Fill TEMP table PostavljanjeTablica();" is calling method that is filling Temp Table. Temp table is table that are saving games that user selected. It is refreshed with every game that user select.



Also if user change date with jcalendar all table has to refresh data:



So everything is working fine untill I change date and try to add new games, or If I try to delete one game from jtable on temp ticket.

I am adding new games on temp ticket with:



And I am deleting selected game from jtable:



"PostavljanjeTablica()" looks like:



Project can be founded on Github:

https://github.com/jskako/HTR---Kladionica
6 years ago
Hey all,

I am having problem with clearing jtable and filling it again with data:

   

Error that I am getting:

java.lang.ArrayIndexOutOfBoundsException: -1



I am not sure what am I doing wrong.
6 years ago
Solution:

1.) Login into gmail account over Your web browser

2.) Go to this link: https://www.google.com/settings/security/lesssecureapps

3.) Click "Turn on"

6 years ago
Hey all,

I am making password recovery module for my software where I need send user data through user mail.

My code is:



The problem is that I am getting this mail from google (google 2-step verification is  disabled):

Someone just used your password to try to sign in to your account from a non-Google app. Google blocked them, but you should check what happened. Review your account activity to make sure that no one else has access.



Is there anything I can do about it or I have to find other way to send mail?
6 years ago