From 6849d198ad4314759c4abec1083d2080337dfd7d Mon Sep 17 00:00:00 2001 From: <3010678@stud.hs-mannheim.de> Date: Wed, 3 Jan 2024 13:05:34 +0100 Subject: [PATCH] =?UTF-8?q?Usereingabe=20&=20Beschr=C3=A4nkung=20auf=2099?= =?UTF-8?q?=20Zeilen=20und=2026=20Spalten=20implementiert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../informatik/spreadsheet/Spreadsheet.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Axel/src/de/hs_mannheim/informatik/spreadsheet/Spreadsheet.java b/Axel/src/de/hs_mannheim/informatik/spreadsheet/Spreadsheet.java index de46be0..2de5c46 100644 --- a/Axel/src/de/hs_mannheim/informatik/spreadsheet/Spreadsheet.java +++ b/Axel/src/de/hs_mannheim/informatik/spreadsheet/Spreadsheet.java @@ -24,6 +24,17 @@ public class Spreadsheet { // TODO limit the maximum size on 99 (1..99) rows and 26 (A..Z) columns + //limit maximum size + + if(rows>99) { + + rows=99; + } + + if(cols>26) { + cols=26; + } + cells = new Cell[rows][cols]; for (int r = 0; r < rows; r++)