Select Table Cell Area accepting Strings mixes up row and column IDs

Open
#166 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
50/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
java

Research direction

Start in TableOperator.java at the integer and String overloads of selectCellArea and compare the parameter order between them. Verify the row and column intervals selected for string coordinates, then run the existing SwingLibrary table-operator tests if available and confirm the string overload behaves like the integer overload.

Written by the indexing model from the issue text.

Description

Hello,
keyword Select Table Cell Area mixes up arguments provided as strings (check below snippet from TableOperator.java):

    private void selectCellArea(int startRow, int endRow, int startColumn,
            int endColumn) {
        jTableOperator.setRowSelectionAllowed(true);
        jTableOperator.addRowSelectionInterval(startRow, endRow);
        jTableOperator.setColumnSelectionAllowed(true);
        jTableOperator.addColumnSelectionInterval(startColumn, endColumn);
    }

    public void selectCellArea(String startRow, String endRow,
            String startColumn, String endColumn) {
        selectCellArea(Integer.valueOf(startColumn),
                Integer.valueOf(endColumn), Integer.valueOf(startRow),
                Integer.valueOf(endRow));
    }

selectCellArea accepting cell coordinates as strings puts Integer.valueOf(startColumn) into startRow parameter etc.

Best regards,
Damian Wojtanowski

Dominant language
Java
Stars
117
Forks
69
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from MarketSquare/SwingLibrary

All issues in MarketSquare/SwingLibrary

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.