Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 26th, 2012  |  syntax: None  |  size: 0.58 KB  |  hits: 12  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Correctly displaying buttons in jOptionPane when text size of the message displayed grows
  2. public void jOptionPane1(agent, text) {
  3.  
  4.             if (GetParameter("MessagesCheck")) {
  5.  
  6.                 String[] choices =  ["Yes", "No", "Default"]
  7.                 JTextArea textArea = new JTextArea(text);
  8.                 textArea.setColumns(125);
  9.                 textArea.setLineWrap(true); textArea.setWrapStyleWord(true);
  10.                 int response = JOptionPane.showOptionDialog(null,textArea,"choices",0,JOptionPane.INFORMATION_MESSAGE,null,choices,choices[2]);
  11.                 }
  12.       }