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.

Message Box
 Post subject: Message Box Post rating: 0   New post Posted: Sat 13 Aug, 2016, 10:18 
User avatar

User rating: 0
Joined: Fri 16 Dec, 2011, 15:05
Posts: 26
Location: Italy, ventimiglia
Hello everybody,

I would like to activate a message box within onTick (...). Is it possible?


 
 Post subject: Re: Message Box Post rating: 0   New post Posted: Fri 26 Aug, 2016, 12:28 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Here is an example
import javax.swing.JOptionPane;

    Object selectedValue = null;

    public void onTick(Instrument instrument, ITick tick) throws JFException {
        Object[] possibleValues = { "First", "Second", "Third" };
        if(selectedValue != null) {
            return;
        }       
        selectedValue = JOptionPane.showInputDialog(null,
            "Choose one", "Input",
            JOptionPane.INFORMATION_MESSAGE, null,
            possibleValues, possibleValues[0]);
        console.getOut().println("selected "+ selectedValue);
    }


 

Jump to:  

  © 1998-2024 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