Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!

Trupti Mehta

Ranch Hand
+ Follow
since Oct 08, 2000
Trupti likes ...
Android Java Java ME
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 Trupti Mehta

@Mohamed, I got your point. I got to update my resources. My mistake I don't jave JavaFX 2.0 but 1.3.1. So things were not getting matched with the application and tutorials.
I will update and if face any problems will get back again.

6 years ago

Mohamed Sanaulla wrote:if you are using JavaFX script - please move to Java API based approach for JavaFX which is new in JavaFX 2.0. JavaFX Script isn't supported.

I dont know about the solution though - you might want to check the tutorial to use the layouts in JavaFX 2.0

@Mohamed, I didn't get you clearly. Can you tell me what do you mean by this. I am a newbie in JavaFX.
I can't get how to use Java approach in JavaFx. I mean JavaFX Class doesn't have any constructor for me to add the init code in it. I should create JavaFX Class or Java class. How do I initialize components and add data to it. There should be some place to do this work.
Couldn't find any tutorial also that explains this all parts nicely. the tutorial avaialbel on Oracle site uses all scripting only - no such code like :
Title t = new Tile()

BTW, is it better to use JavaFx2.0 or lower verison ?
6 years ago


I want to have a tile layout with 3 cols & 2 rows & dynamic content added to it.
This is my code :

How do I set mainScreenItems to Tile ? I actually want to add Buttons with this form.
And If I want to make this tile as a class then should I defien a customNode as a class something like :

class MyTile: Node {
setLayout ???
Add buttons ??

Kindly help me with this.
6 years ago


I have created a simple JavaFx application and want to execute on a third PC. It has Java nd I installed JavaFX Jre. But it I couldn't execute my application.

Why so. What more does it need to execute the application on a standard pc.
6 years ago

Hi all,

I am a newbie for JavaFX. I want to develop a client which has tiles and on clicking a tile again other tiles appear. Finally a other layout for entry/view appears.

I belive for this I got to have different layout classes for each and call one by one in the main class. But am not able to get how to achive this. I read couple of turotials but couldn't get what I want to achieve.

What is the best possible way to achieve this? Please try to help me at the earliest. Any help is highly appreciated.

6 years ago

Perry Hoekstra wrote:Bob Lee posted on his blog a solution to this:

Yes Perry, already had a look at it. It needs Bouncy Castle's and all. I already have my own "certificate.cer" file. With that how do I work out !!!
6 years ago

Ulf Dittmer wrote:That was a rhetorical question - since no CA knows about the certificate, what should validation entail?

Ulf Dittmer, when I call a web service, the server sends a self-signed certificate, and I got to validate it. My first requirement is :
How to get the server's certificate?
Then coems to validate its public key.
6 years ago
That's what my point incldes. How do I test and get the certificate received from server ?
6 years ago

I am calling web service from my android client via https. I got to validate the certificate receive from server side. How do I do that ? At present this is my code that I use to call a web service.

How do I validate a self-signed certificate received from server during performing Post ? I got to do testing via public/private keys. Client will have a CA file. Ijust need the client to verify the server certificate using the CA, the service is public .This has to do with public/private key.

Any help is highly appreciated.
6 years ago

Hardik Trivedi wrote:Orientation do affect Alert Dialog.
You can handle AsyncTask too. Just call some method on positive button of AlertDialog.And you can display progressDialog from that method.runOnUiThread I think help you out.
You can make your own customize Alert Dialog too.

Thanks Hardik.

What do you mean by - "Orientation do affect Alert Dialog."
Do you mean that it handles itself and we don't need to code or handle ? Whereas in custom dialog we need to handle it ourselves !!

Well, On positive button clickI will call AsyncTask object. In that only in onPre I will open ProgressDialog and in onPost close the ProgressDialog. I guess this will be running on UI thread only via AsyncTask !!!

6 years ago


I have to make a dialog with 2 editfields and a process which will be handled in AsyncTask on a button click. I found that I can add editfields in alertdialog and work out. My queries are :
1) In the AsyncTask process, I will also have to show a ProgressDialog. Can I show a ProgressDialog on top of AlertDialog ?
2) To make coding simple and easy, I wuold prefer if I can extend AlertDialog. Is it possible to extend AlertDialog or should I extend AlertDialog.Builder ? I am confused with this state.
3) In whichever button presses, eventually the dialog will be closed, but need to run AsyncTask on positive button. Is it fine to work like this with an AlertDialog !
4) Will AlertDialog also handle the orientation part on its own like Landscape or portrait as it is suppossed to do.

Any help, guidance with this can be helpful.

6 years ago

[b]GOT IT .[/b]

Added onAttachedToWindow() method. Tested if I have getContext() in that and I do have. And I try to perform the button click and the LoginTask shows the ProgressDialog.

Thanks to all. This might help anyone who is trying somethng like me i.e. to perform a button click on start of a dialog and using its context.
6 years ago

I have a dialog called from Activity's onCreate. When the dialog opens, I want to perform a button click. I added btn_ok.performClick() in onStart() of the dialog. But I receive an Exception NullPointerException at Log.i statement of onClick(). If I remove that Log.i then it works and calls new LoginTask().execute.

In my onClick for that button code :

BUT the problem that I face is: If I click the button normally then the app shows the ProgressDialog (dialog = new ProgressDialog(mContext); // mContext is the context of main dialog) that is in onPre of LoginTask . But now, when I am performing the click programmatically from onStart(), I don't see the ProgressDialog. The doInBackground() work is appening (came to know from Logs) but their is no ProgressDialog to let the user know that the task has started.

It seems like this.getCurrentFocus().getId()); is throwing NullPointerException, so till onStart() is comlpeted, I don't have the focus and/or the id. Without that it can't have context to pass to the ProgressDialog and thus ProgressDialog is not showing or what ? These are just my thinkings based on logic.

How to overcome this problem ? Any help is highly appreciated.

6 years ago

Michael Hari wrote:Personally, I would start by converting your TableLayout to a Relative or Linear Layout. Table Layout is such and eyesore and pain.

I'm kind of curious what you're trying to accomplish here. From what I'm reading, you're just trying to make an input Dialog. Can you post the java code as well?

This is my Java code related the issue. NOTE: If the text of mMessage is just a small text that fits in a line, then all stays fine. But if more than 1 line text is there the problem arises i.e. both the text fields are lost. Surprising, when I click Login button again a nd again the ProgressDialog comes up, I can see the both editText's behin the ProgressDialog.

6 years ago