List of usage examples for javax.swing JLabel setLocation
public void setLocation(Point p)
From source file:com.sec.ose.osi.ui.frm.main.identification.codematch.JPanCodeMatchMain.java
private void setCurPosition() { if (totalLine != 0) { log.debug("setCurPosition selectSnippetNum : " + selectSnippetNum); JLabel jLabelPosition = null; int curPosY = 0; if (totalLine > 0 && getSimilarSnippets().size() > 0) { curPosY = getSimilarSnippets().get(selectSnippetNum).getLeftSnippet().getFirstLine() * getJSplitPaneSourceCode().getHeight() / totalLine; }/*from ww w. j a v a 2s. c om*/ jLabelPosition = new JLabel(); jLabelPosition.setPreferredSize(new Dimension(15, 15)); jLabelPosition.setLocation(new Point(35, curPosY)); jLabelPosition.setSize(new Dimension(15, 15)); jLabelPosition.setText(""); getJPanMatchedSourceViewLeft().getJPanelNavigator().add(jLabelPosition, null); } }