# \[JAVA\] LIBRARY(UiBooster) - How do I get it to work?

**URL:** <https://discourse.processing.org/t/java-library-uibooster-how-do-i-get-it-to-work/35603>\
**Category:** Libraries\
**Created:** [March 6, 2022, 10:11pm UTC](https://discourse.processing.org/t/java-library-uibooster-how-do-i-get-it-to-work/35603 "2022-03-06T22:11:43Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![GWAK](https://avatars.discourse-cdn.com/v4/letter/g/13edae/32.png) [@GWAK](https://discourse.processing.org/u/GWAK)\
**Post date:** [March 6, 2022, 10:11pm UTC](https://discourse.processing.org/t/java-library-uibooster-how-do-i-get-it-to-work/35603/1 "2022-03-06T22:11:44Z")

</div>

1. ref url : [TableDialog](https://milchreis.github.io/uibooster-for-processing/reference/uibooster/components/TableDialog.html)
2. ref url2 : [GitHub - Milchreis/uibooster-for-processing: 🚀 Creates fast and easy dialogs for utility tools for Processing](https://github.com/Milchreis/uibooster-for-processing)

1. Package uibooster \> Class UiBooster \> showTable​

```auto
String[][] modifiedData = new UiBooster().showTable( // showTableImmutable for immutable tables
        new String[][]{
                {"Jimmy Johnson", "35", "Zombieland"},
                {"Danny Durango", "23", "Hangover"},
                {"Larry Berry", "54", ""}
        },
        Arrays.asList("Name", "Age", "Favorite movie"),
        "Favorite movies");

```

The above source code works fine.

1. Package uibooster.components \> Class TableDialog \> showTable​

`static java.lang.String[][]	showTable​(java.lang.String[][] data, java.util.List<java.lang.String> header, java.lang.String title, java.lang.String iconPath, boolean isEditable)`

```auto
String[][] modifiedData = new UiBooster().showTable( // showTableImmutable for immutable tables
        new String[][]{
                {"Jimmy Johnson", "35", "Zombieland"},
                {"Danny Durango", "23", "Hangover"},
                {"Larry Berry", "54", ""}
        },
        Arrays.asList("Name", "Age", "Favorite movie"),
        "Favorite movies","icon.png",false);

```

The above source code does not work. Why?  
The function is not recognized. Does anyone have any idea how to use it?

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [March 6, 2022, 10:20pm UTC](https://discourse.processing.org/t/java-library-uibooster-how-do-i-get-it-to-work/35603/2 "2022-03-06T22:20:30Z")

</div>

> [@GWAK](#):
>
> `"Favorite movies", "icon.png", false);`

Is “icon.png” inside subfolder “data/”?  
If so, maybe **dataPath()** can help:  
`"Favorite movies", dataPath("icon.png"), false);`

---

<div class="post-metadata">

**Author:** ![GWAK](https://avatars.discourse-cdn.com/v4/letter/g/13edae/32.png) [@GWAK](https://discourse.processing.org/u/GWAK)\
**Post date:** [March 6, 2022, 10:43pm UTC](https://discourse.processing.org/t/java-library-uibooster-how-do-i-get-it-to-work/35603/3 "2022-03-06T22:43:10Z")

</div>

@GoToLoop

`The method showTable(String[][], String[], String) in the type UiBooster is not applicable for the arguments (String[][], String[], String, String, boolean)`

Thank you for answer.

I think I need to change the ‘class’ content as above, but I don’t know how to do it.

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [March 6, 2022, 11:26pm UTC](https://discourse.processing.org/t/java-library-uibooster-how-do-i-get-it-to-work/35603/4 "2022-03-06T23:26:44Z")

</div>

> [@GWAK](#):
>
> , but I don’t know how to do it.

I don’t have that UiBooster installed.

But I’ve blindly coded the example below following the signatures from its source code:

```auto
import uibooster.UiBooster;
import uibooster.model.UiBoosterOptions.Theme;

static final String TITLE = "Favorite movies", ICON_FILE = "icon.png";
static final String[] HEADER_TITLES = { "Name", "Age", "Favorite Movie" };

static final String[][] TABLE_DATA = {
  { "Jimmy Johnson", "35", "Zombieland" }, 
  { "Danny Durango", "23", "Hangover" }, 
  { "Larry Berry", "54", "" }
};

UiBooster tableDialog;

void setup() {
  tableDialog = new UiBooster(Theme.DEFAULT, dataPath(ICON_FILE));
  tableDialog.showTable(TABLE_DATA, HEADER_TITLES, TITLE);

  for (final String[] rowData : TABLE_DATA) println(rowData);
  exit();
}

```

> <https://github.com/Milchreis/uibooster-for-processing/blob/1.14.0/src/uibooster/UiBooster.java#L51-L53>

> <https://github.com/Milchreis/uibooster-for-processing/blob/1.14.0/src/uibooster/UiBooster.java#L382-L393>

---

<div class="post-metadata">

**Author:** ![GWAK](https://avatars.discourse-cdn.com/v4/letter/g/13edae/32.png) [@GWAK](https://discourse.processing.org/u/GWAK)\
**Post date:** [March 7, 2022, 8:02am UTC](https://discourse.processing.org/t/java-library-uibooster-how-do-i-get-it-to-work/35603/5 "2022-03-07T08:02:12Z")

</div>

@GoToLoop

**You are a genius and an angel.**

First of all, it was built on the basis of what you told me. The action is fine.

> <https://github.com/Milchreis/UiBooster/issues/64>
>
> 1. ref url : https://milchreis.github.io/uibooster-for-processing/reference/uibo…oster/components/TableDialog.html
> 2. ref url2 : https://github.com/Milchreis/uibooster-for-processing
> 
> 
> 1) Package uibooster \> Class UiBooster \> showTable​
> 
> \`\`\`
> String\[\]\[\] modifiedData = new UiBooster().showTable( // showTableImmutable for immutable tables
> new String\[\]\[\]{
> {"Jimmy Johnson", "35", "Zombieland"},
> {"Danny Durango", "23", "Hangover"},
> {"Larry Berry", "54", ""}
> },
> Arrays.asList("Name", "Age", "Favorite movie"),
> "Favorite movies");
> 
> \`\`\`
> 2) Package uibooster.components \> Class TableDialog \> showTable​
> 
> \`static java.lang.String\[\]\[\]	showTable​(java.lang.String\[\]\[\] data, java.util.List\<java.lang.String\> header, java.lang.String title, java.lang.String iconPath, boolean isEditable)\`
> 
> \`\`\`
> String\[\]\[\] modifiedData = new UiBooster().showTable( // showTableImmutable for immutable tables
> new String\[\]\[\]{
> {"Jimmy Johnson", "35", "Zombieland"},
> {"Danny Durango", "23", "Hangover"},
> {"Larry Berry", "54", ""}
> },
> Arrays.asList("Name", "Age", "Favorite movie"),
> "Favorite movies","icon.png",false);
> \`\`\`
> 
> The above source code does not work. Why?

(The person who made the library provided the reference material.)  
(I asked a question, and I answered it.)

**The ‘icon’ setting was successful with the help of ‘GoToLoop’ and ‘Library Maker’.**

> import uibooster.UiBooster;  
> import uibooster.components._;  
> import uibooster.model._;
> 
> static final String TITLE = “Favorite movies”, ICON\_FILE = “icon.png”;  
> static final String HEADER\_TITLES = { “Name”, “Age”, “Favorite Movie” };
> 
> static final String TABLE\_DATA = {  
> { “Jimmy Johnson”, “35”, “Zombieland” },  
> { “Danny Durango”, “23”, “Hangover” },  
> { “Larry Berry”, “54”, “” }  
> };
> 
> String tableData;
> 
> UiBooster tableDialog;
> 
> void setup() {
> 
> tableDialog = new UiBooster(UiBoosterOptions.Theme.DARK\_THEME, dataPath(ICON\_FILE));  
> tableDialog.showTable(TABLE\_DATA, HEADER\_TITLES, TITLE);
> 
> }

However, there is a function that prevents the table data value from being modified, so I think we need to find out how to do it.

---

<div class="post-metadata">

**Author:** ![GWAK](https://avatars.discourse-cdn.com/v4/letter/g/13edae/32.png) [@GWAK](https://discourse.processing.org/u/GWAK)\
**Post date:** [March 7, 2022, 8:29am UTC](https://discourse.processing.org/t/java-library-uibooster-how-do-i-get-it-to-work/35603/6 "2022-03-07T08:29:46Z")

</div>

> import uibooster.UiBooster;  
> import uibooster.components._;  
> import uibooster.model._;
> 
> static final String TITLE = “Favorite movies”, ICON\_FILE = “icon.png”;  
> static final String HEADER\_TITLES = { “Name”, “Age”, “Favorite Movie” };
> 
> static final String TABLE\_DATA = {  
> { “Jimmy Johnson”, “35”, “Zombieland” },  
> { “Danny Durango”, “23”, “Hangover” },  
> { “Larry Berry”, “54”, “” }  
> };
> 
> String tableData;
> 
> UiBooster tableDialog;
> 
> void setup() {
> 
> tableDialog = new UiBooster(UiBoosterOptions.Theme.DARK\_THEME, dataPath(ICON\_FILE));
> 
> tableDialog.showTableImmutable(TABLE\_DATA, HEADER\_TITLES, TITLE); // unmodifiable form
> 
> tableDialog.showTable(TABLE\_DATA, HEADER\_TITLES, TITLE); // editable form
> 
> }

@GoToLoop  
Dear GoToLoop,  
Very thank you.
