Example usage for javax.swing JLabel setLocation

List of usage examples for javax.swing JLabel setLocation

Introduction

In this page you can find the example usage for javax.swing JLabel setLocation.

Prototype

public void setLocation(Point p) 

Source Link

Document

Moves this component to a new location.

Usage

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);
    }
}