Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!

Haris Tasawar

Ranch Hand
+ Follow
since Aug 19, 2011
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Haris Tasawar

actually, your right Eric... this array is basically in a JSON object and the code is:

Sale = new JSONObject();
Sale.put("payment", new JSONArray());

and then after i have updated a JSON object which contains the values, i fill the JSON array like this:

int currentIndex = 0;
currentIndex = Sale.getJSONArray("payment").size();

Where, pay is a JSON object of all the values.

Hello all,
I have a JSON array named "payments" which contain these fields:

1. product name
2. amount
3. change

Now, i have to add another key named "batchid" with value "1" to this JSONArray. How can i push another key with its respected value to this array? Please any help would be appreciated.

well it does not give an error when i am compiling it, it actually give me an error as soon as i declare the above LOC:

The type of the expression must be an array type but it resolved to Object
8 years ago
Hey all,
I have a JSON object named "Sale" which contains a JSONarray named "Lineitems". Now this array contains three fields (id,name,quantity) but i only want to access the field named quantity and save it as an object in the object variable named "Params". How can i accomplish this:

i recently tried this Line of code:

Params = Sale.getJSONArray.("lineitems").get(2);

but this gives me an error saying Params should be a JSONArray variable not with type "object".

Please help... i want this data to be retrieved and saved as an object.


8 years ago
and as for the border layout, is is possible to implement two Jtables in the center, maybe it isnt, also i put the Revalidate() method and still i see no table?
8 years ago
i am sorry for the bad programming, its just that i didnt had it in mind when i was creating the project, i would surely re implement the code using different classes for sure, from next time i would make sure that i used proper formatting of the post.... Sorry about that, anyways i would do the revalidate and let you guys know
8 years ago
hey guys,
I am running into a problem and i need help, i basically have a jframe with two JPanels which would hold the JScrollpanes of jtables, there are also two JTextFields who would act as a search bar for populating the the Jtable, the programming of data is done correctly but i am running into a problem, the second Jtable does not show until and unless i resize the jframe window, i cant get it to work. I have tried validate(), update(), setvisible() but it wont work,

Please guys i need your help.

I have add screenshots for reference and the code i given below:


8 years ago
ok an easy way to put this is (encrypting aside) is that i just want to encrypt the database Username and Password in hibernate.cfg.xml. So i started searching and found out this, but if there is any other way to do this then i`ll be cool. Just wanted to know if i had more options.

Hey all,
Could someone tell me a good tutorial of how to integrate jasypt with hibernate... i am having difficulty understanding it from the its official site... please help
Never had that kind of problem before, check your database and then again try to build the hibernate hbm and class files using hibernate tools
Not sure what kind of annotations...are you talking about join annotations??? as in primary and foreign key annotations
But i recently created an app using null layout.... i agree it was pain and took time but got it done when i got the hang of it..
8 years ago
Just kidding... i mean you guys are right that layouts are suitable but everyone have their choices... maybe that`s why they included it.
8 years ago
LOL.... well if it isnt suited then why is it there???
8 years ago