# Among the uibooster library examples, it is related to 'table'. Is it possible to change?

**URL:** <https://discourse.processing.org/t/among-the-uibooster-library-examples-it-is-related-to-table-is-it-possible-to-change/38553>\
**Category:** Libraries\
**Created:** [August 29, 2022, 11:42pm UTC](https://discourse.processing.org/t/among-the-uibooster-library-examples-it-is-related-to-table-is-it-possible-to-change/38553 "2022-08-29T23:42:15Z")\
**Posts on this page:** 5\
**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:** [August 29, 2022, 11:42pm UTC](https://discourse.processing.org/t/among-the-uibooster-library-examples-it-is-related-to-table-is-it-possible-to-change/38553/1 "2022-08-29T23:42:15Z")

</div>

Among the uibooster library examples, it is related to ‘table’. Is it possible to change?

 ![fig2](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/8/4/841b24eb0fb4c49c13eb0f0d6bddde4153ba01fa.jpeg)

Please refer to the image.  
source code

```auto
import uibooster.*;
UiBooster booster;

void setup() {
  size(800, 400);

  booster = new UiBooster();

  // user showTableImmutable() for immutable tables
  String[][] modifiedData = booster.showTable(
      new String[][]{ // data in 2d array
              {"Jimmy Johnson", "35", "Zombieland"},
              {"Danny Durango", "23", "Hangover"},
              {"Larry Berry", "54", ""}
      },
      new String[] {"Name", "Age", "Favorite movie" }, // header
      "Favorite movies");         
      
      println(modifiedData);
      
      // window title
}

void draw() {
  background(10);
}

```

Can’t you adjust the size of ‘W1’, ‘W2’, and ‘W3’ before the ‘table’ window opens?

---

<div class="post-metadata">

**Author:** ![mnse](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/mnse/32/16520_2.png) [@mnse](https://discourse.processing.org/u/mnse)\
**Post date:** [August 30, 2022, 6:36am UTC](https://discourse.processing.org/t/among-the-uibooster-library-examples-it-is-related-to-table-is-it-possible-to-change/38553/2 "2022-08-30T06:36:04Z")

</div>

Hi @GWAK,

No! Not by using the interfaces provided by the library.  
Nevertheless, you can look at the code and maybe tinker your own Table on which you can set the column widths…

If you have then access to the JTable object you can do s.th like

```auto
JTable table=...;
table.getColumnModel().getColumn(<a_column_number>).setPreferredWidth(<the_width>);
table.getColumnModel().getColumn(<a_column_number>).setMaxWidth(<the_width>);

```

Cheers  
— mnse

> **[GitHub - Milchreis/UiBooster: 🚀 Creates fast and easy dialogs for utility tools](https://github.com/Milchreis/UiBooster)**
>
> 🚀 Creates fast and easy dialogs for utility tools. Contribute to Milchreis/UiBooster development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [August 30, 2022, 4:48pm UTC](https://discourse.processing.org/t/among-the-uibooster-library-examples-it-is-related-to-table-is-it-possible-to-change/38553/3 "2022-08-30T16:48:54Z")

</div>

a link for you:

see [Display Table data from a csv and return the rowID when the user clicks on a row - #2 by Chrisir](https://discourse.processing.org/t/display-table-data-from-a-csv-and-return-the-rowid-when-the-user-clicks-on-a-row/38548/2)

---

<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:** [August 30, 2022, 11:02pm UTC](https://discourse.processing.org/t/among-the-uibooster-library-examples-it-is-related-to-table-is-it-possible-to-change/38553/4 "2022-08-30T23:02:16Z")

</div>

@mnse

Thanks for your reply.

---

<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:** [August 30, 2022, 11:02pm UTC](https://discourse.processing.org/t/among-the-uibooster-library-examples-it-is-related-to-table-is-it-possible-to-change/38553/5 "2022-08-30T23:02:58Z")

</div>

@Chrisir

Thanks for your reply.  
I took a look at the source code. thank you.
