Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Try to find an answer in Wiki before asking a question.
    Submit programming questions in this forum only.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

need Usage example of IUserInterface.getMainFrame();
 Post subject: need Usage example of IUserInterface.getMainFrame(); Post rating: 0   New post Posted: Sun 13 Jun, 2010, 01:26 
User avatar

User rating: 21
Joined: Thu 19 May, 2011, 20:50
Posts: 413
Location: Germany, Munich
Could anyone suppot an example of usage for the following code
private IUserInterface userInterface = null;
public void onStart(IContext context) throws JFException {
     this.userInterface = context.getUserInterface();
     JFrame myJFrame= userInterface.getMainFrame();
(...)

How to set up a component into the MainFrame (JFrame) of the IUserInterface?


 
 Post subject: Re: need Usage example of IUserInterface.getMainFrame(); Post rating: 0   New post Posted: Mon 14 Jun, 2010, 08:47 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
What exactly do you want to do?
Here https://www.dukascopy.com/swiss/english/forex/jforex/forum/viewtopic.php?f=7&t=563&p=6830&hilit=alerter#p6830
is nice example, how to use a JForex IUserInterface.


 
 Post subject: Re: need Usage example of IUserInterface.getMainFrame(); Post rating: 0   New post Posted: Tue 15 Jun, 2010, 10:04 
User avatar

User rating: 21
Joined: Thu 19 May, 2011, 20:50
Posts: 413
Location: Germany, Munich
I want to place a persistent button somewhere into the MainFrame.
Your example does not show the usage of "getMainFrame()".

Can you please explain this function?
Which Frame is here extracted and how to control it?

Thanks.


 
 Post subject: Re: need Usage example of IUserInterface.getMainFrame(); Post rating: 0   New post Posted: Tue 15 Jun, 2010, 10:20 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
As you can see from the API https://www.dukascopy.com/swiss/docs/api/index.htm, a method getMainFrame is for one purpose only:
Quote:
Returns main frame. Can be used as parent for dialogs to show them on the same screen
We strongly do not recommend you to use this method for such purposes as place other components on JForex inner components. There is no guarantee that your solution will work after new JForex version will bee released. Its better to use an approach like in the Alerter - create separate inner component with a given tools, like getBottomTab.


 

Jump to:  

cron
  © 1998-2025 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com