mirror of
https://github.com/processing/processing4.git
synced 2026-02-13 18:35:37 +01:00
use show() instead
This commit is contained in:
@@ -101,12 +101,14 @@ public class CompletionPanel {
|
||||
scrollPane.setViewportView(completionList);
|
||||
scrollPane.validate();
|
||||
popupMenu.setSize(dimen);
|
||||
popupMenu.setLocation(location);
|
||||
//popupMenu.setLocation(location);
|
||||
this.subWord = new String(newSubword);
|
||||
if (subWord.indexOf('.') != -1)
|
||||
this.subWord = subWord.substring(subWord.lastIndexOf('.') + 1);
|
||||
insertionPosition = position;
|
||||
log("Suggestion updated" + System.nanoTime());
|
||||
popupMenu.show(textarea, location.x, textarea.getBaseline(0, 0)
|
||||
+ location.y);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -733,9 +733,8 @@ public class TextArea extends JEditTextArea {
|
||||
suggestion = new CompletionPanel(this, position, subWord, defListModel,
|
||||
location,editor);
|
||||
else
|
||||
suggestion.updateList(defListModel, subWord,
|
||||
new Point(getLocationOnScreen().x + location.x,
|
||||
getLocationOnScreen().y + location.y), position);
|
||||
suggestion.updateList(defListModel, subWord, location, position);
|
||||
|
||||
suggestion.setVisible(true);
|
||||
// requestFocusInWindow();
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
|
||||
Reference in New Issue
Block a user