Code example for NumberFormat

Methods: setMinimumIntegerDigits

0
    NumberFormat nf = NumberFormat.getInstance();
 
    public LoadIconsForOutputTask(Application app, IconContainerPanel p)
    { 
        super(app,p);
        nf.setMinimumIntegerDigits(2);
    } 
 
    public LoadIconsForOutputTask(Application app, Connector c) {
        super(app,c);
    } 
 
    @Override 
    protected Action getButtonAction() { 
        return app.getContext().getActionMap(new ConnectorActions()).get("assignOutputIcon"); 
    } 
 
    @Override 
    protected String getIconResourceString(int index) {
        return "output_" + nf.format(index);
    }