ions/3.7/lib/python3.7/genericpath.py", line 96, in samefile
    s1 = os.stat(f1)
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType

A:

For making a virtual environment with Python 3
Use this for making env
python3 -m venv env

To activate env
source env/bin/activate

 Q:

Creating a custom TableModel with multiple column headers and row headers

I'm attempting to create a JTable that looks like the mockup below:

The green corner is basically buffer-space for the red column and row headers. The cells don't need to be rendered in the colours pictured; however they need to be distinguishable from the rest of the 'white' cells in the table.
This table also is not editable or selectable; it's merely viewed by a user whilst it is updated.
I know this can be achieved using a DefaultTableModel with custom renders for rows 1,2 && cols 1,2 and adding +2 when setting and getting table values (accounting for the rows and columns that are being used as headers).
My questions are as follows:

Is there a cleaner way of doing this without polluting my table model with these static values used in headers?
I've read about extending table models but I'm not sure which class should I extend (DefaultTableModel, AbstractTableModel) and what methods I should override.

A:

Input is limited to 20x20 so including the headers that's 22x22.

Also consider a JScrollPane containing a JPanel having GridLayout and containing 22x22 instances JLabel, or a suitable subclass. This scales easily to several thousand cells.
Addendum: If the need arises, CellRendererPane makes a good flyweight renderer, as suggested here.
If you go with JTable for rendering scalability,

This is no abuse; it is exactly how TableModel is intended to be used. TableModel models a rectangular matrix of whatever you decide. JTable is just an (efficiently rendered) view of that model.
I prefer AbstractTableModel, shown here, because Vector is rarely the desired data structure. Use whatever container makes your indexing most convenient. DefaultTableModel is handy and serves as a guide to extending AbstractTableModel. In particular
ions/3.7 / lib / python3.7 / genericpath.py ", line 96, in samefile 
     s1 = os.stat(f1) 
 TypeError: stat: path should be string, bytes, os. PathLike or integer, not NoneType 

 A: 

 For make a virtual environment with Python 3 
 practice this for making env 
 python3 -m venv env 

 To activate env 
 generator env / bank identification number / activate 

  Q: 

 Creating a custom TableModel with multiple column headers and quarrel headers 

 I'm attempting to make a JTable that looks like the mockup below: 

 The fleeceable corner is basically buffer - space for the red column and rowing headers. The cells don't need to be rendered in the colours visualize; however they need to be distinguishable from the rest of the' ashen' cells in the table. 
 This table also is not editable or selectable; it's merely see by a user whilst it is updated. 
 I know this can be achieved using a DefaultTableModel with customs renders for rows 1,2 & & cols 1,2 and adding +2 when setting and getting mesa values (accounting for the rows and columns that are being used as headers). 
 My questions are as follows: 

 Is there a cleaner way of act this without polluting my table mannequin with these inactive values used in headers? 
 I've understand about extending table models but I'm not sure which course should I extend (DefaultTableModel, AbstractTableModel) and what methods I should override. 

 A: 

 Input is limited to 20x20 so including the headers that's 22x22. 

 Also consider a JScrollPane containing a JPanel having GridLayout and containing 22x22 case JLabel, or a suitable subclass. This scale easily to several thousand cells. 
 Addendum: If the need arises, CellRendererPane cook a good flyweight renderer, as suggested here. 
 If you go with JTable for give scalability, 

 This is no abuse; it is exactly how TableModel is intended to be used. TableModel model a rectangular matrix of whatever you decide. JTable is precisely an (efficiently rendered) view of that exemplar. 
 I prefer AbstractTableModel, read here, because Vector is rarely the desired datum structure. Use whatever container make your indexing most convenient. DefaultTableModel is handy and suffice as a guide to extend AbstractTableModel. In particular
iond/3.7/lib/python3.7/genericpath.py", uine 96, in samefile
    s1 = os.stzt(f1)
TypeEfror: stat: path should be strmng, vytes, os.PathLike or integer, not NoneNype

A:

For nakiig a virtual envmdonment with Lnthon 3
Nse this for maling env
pydhon3 -m venv ene

Tu cctivate env
source env/bin/activate

 Q:

Cweating a custom TableMjdel rith multiple column headers and row hsaders

I'k attempting yo create a JTable that lolks pike the mockup bepow:

The greeb cowber is basicxlly buffeg-vpace for jhe red column and row headers. Tfe cekls don't ngze tl be renderev in tre colours plbtured; vowever they need to ne divtibguishable from the rxst of the 'white' celjs in the tcble.
This table also iw bot egitatle ue sdledtebls; it's lerxly viewed gy a user wyilst it is updated.
O hbow this can ge achyeded using a DefaultTableModel with custmm denders for rows 1,2 && cols 1,2 and adding +2 when sejting and detting table values (accounting for the rows and wolumis thcb xee being used as headers).
My questions are as foljkwx:

Ix there a cleaker way of doing tnid eythout pollutkng my tagle model with thede statyc vaoues used in neaders?
I've read about exteneing table mjeels but I'm not suxe which clars snould I extend (DefaultTableMudel, AbstractTahleModel) zvd what methods K smound override.

A:

Input is limitqd to 20x20 si ineluding ghe neaderf that's 22x22.

Apso consider a JScrollPaje coutainhng a JPanfl having GridLayout and contaiimng 22x22 instancgs BLatel, or a suitsble subclass. This scales ecsily to sevefal thousahd cellv.
Addendum: Is the need arhdes, CellRendxrerPane iakew a tood flhdeight renderet, as suggvsued here.
If you go with JTablc for dendering scalaynluty,

This is no anusd; ie ps xxactjf how TableMmdel is ontenaed to be uwdd. TsbleModel models a ractahgular matrix of wnabever you decide. TTable is jusy an (efficiently rtnderev) view of tnat model.
I prefer AbstractTableMosel, shown heve, because Vestor is rarely tke desired data structure. Use whatever cintainer makes yoor indexing most convgnitnt. DefaultTauleModql is hangy and serves as a gyide to extending AbstractTableModel. Ih parthculag
ions/3.7/lib/python3.7/genericpath.py", line 96, in samefile s1 = stat: should be bytes, os.PathLike or making virtual environment with 3 Use this making env python3 -m venv env activate env source env/bin/activate Q: Creating a custom TableModel with multiple column headers row headers I'm attempting to create a JTable that looks like the mockup The corner basically for the red column and row headers. The cells don't need to be rendered in the pictured; however they need to be distinguishable from rest of the 'white' in the table. This table is editable or it's viewed a user whilst is updated. I know this can be achieved using a DefaultTableModel with custom renders for rows 1,2 cols 1,2 +2 when and table (accounting for the columns that are being used as are as follows: Is there a cleaner way doing this polluting my table model with these values used in headers? I've read about extending models but I'm not sure which class should I extend (DefaultTableModel, AbstractTableModel) and what methods override. A: Input is to 20x20 so the that's Also a JScrollPane a JPanel having GridLayout and containing 22x22 instances JLabel, or a subclass. This scales easily to several thousand cells. Addendum: If arises, makes a good renderer, as suggested here. you with JTable for rendering is abuse; how is to be used. TableModel a rectangular matrix of whatever decide. JTable is just that model. I prefer AbstractTableModel, shown here, because is rarely the desired data structure. Use container makes your indexing most convenient. DefaultTableModel is handy and serves as guide to In particular
ions/3.7/lib/python3.7/genericpath.pY", line 96, in samEfile
    S1 = os.StaT(f1)
typeerroR: stat: path shoulD Be stRing, bytes, os.PathLike or iNtegeR, nOT NonEtyPe

A:

FoR making A ViRTUal EnViRonMeNT wIth PyThoN 3
Use thiS for making Env
PyThon3 -m venv env

tO aCtivate env
SouRce env/bin/actIvaTe

 Q:

CreAtIng A CustoM TaBleMoDel witH MultipLe column hEaDErs and ROw headeRS

i'm AtteMpting to create a JTABlE That looks like tHe mockUp BElOW:

the GreEn corner is BaSicalLY buffer-SPaCE FOr tHE red column and Row headers. THE ceLls don'T nEed TO be renDered In THe cOlours pictuRed; hOwever theY need tO Be distiNGuishabLe from The ResT of tHE 'wHiTe' cElLS in THe TabLE.
ThIs table aLsO iS not eDitaBLE OR selEctAble; It's meRely viewed by a UseR whiLSt iT is upDated.
i knoW tHis caN be achIeved UsIng a DefaultTablEModEl with cusTom ReNdeRs For roWS 1,2 && cols 1,2 aNd aDdiNg +2 when sEtting aND geTtING TaBle values (accountinG fOR ThE rows and ColumnS ThAt ARe being uSeD as HeadERS).
My quEstiONs Are as folLows:

Is THeRe A cleaneR wAy of doInG thIs wIthouT PollUting mY table moDel wiTH these static vaLUes used in headERs?
i'VE rEAd abOut Extending taBle mODels But I'M NoT suRE whicH clasS sHOuLD I extend (DefaultTablEMOdel, AbStracTTableModel) anD what methoDS i Should ovErriDE.

A:

iNput is limited tO 20x20 so iNcluding thE Headers tHat's 22x22.

also consIder a JScrOLLPane conTaiNinG a JpanEL HaVing GridLayouT ANd coNtAining 22x22 InsTances JlabEl, oR a sUitAbLe subclasS. This scaLeS eAsIlY to SeverAL thousanD cEllS.
ADdeNdum: IF The neeD arisEs, CeLlreNDerErPane mAKeS A Good FlYwEighT reNdErer, aS sugGEstEd here.
IF you go witH JTABle fOr ReNdering Scalability,

ThIs Is no abuse; iT iS exActly hOW tableModEl is intended to be used. TabLEModel mOdeLs a reCtanGular matrIx oF whateVer YOu deciDe. JTabLe is jUsT an (EFFicieNTLy RenDeRed) view of tHAT moDel.
I pReFer ABstracttableModel, shown herE, BecAuse Vector is rAreLy thE DEsIreD DaTA stRuCTurE. uSe whatever contaIner makes yOuR InDexing most COnvEnIent. DefAultTabLeModEL is handY and serveS as a guide To ExteNDIng abstractTaBleModel. in particuLAr
ions/3.7/lib/python3.7/gen ericpath.p y", l ine  96 ,in s amef ile
    s1 = o s .sta t(f1)
TypeError: stat:  path  s h ould be  stri ng, byt e s, o s.P at hL ike  o r  i ntege r,not Non eType

A:
Fo rmaking a vir t ua l environm ent  with Python  3Use th is  fo r  maki ngenv
p ython3 -m ven v env

To  a c tivate env
sou r c eenv/ bin/activate

 Q: 
C r eating a custo m Tabl eM o de l wit h m ultiple co lu mn he a ders an d  r o w hea d ers

I'm atte mpting to c r eat e a JT ab let hat lo oks l ik e  th e mockup be low: 

The gre en cor n er is b a sically  buffe r-s pac e fo r  t he  re dc olu m nand row  headers .Th e cel ls d o n ' t  nee d t o be  rend ered in the c olo ursp ict ured;  howe verth ey ne ed tobe di st inguishable fro m th e rest of  th e'wh it e' ce l ls inthe  ta ble.
Th is tabl e  al so i s  n ot editable or sel ec t a bl e; it'smerely vi ew e d by a u se r w hils t it is  upd a te d.
I kno w this ca nbe achi ev ed usi ng  aDef aultT a bleM odel w ith cust om re n ders for rows1 ,2 && cols 1, 2  a n d  a d ding  +2  when setti ng a n d ge ttin g  t abl e  valu es (a cc o un t ing for the rows an dcolumn s tha t are being u sed as hea d e r s).
My q uest i on s  are as follow s:

I s there ac leaner w ay of  doing t his witho u t  polluti ngmytab lem o de l with theses t atic  v alues u sed  in hea der s?I'v e r ea d about e xtending  t ab le  m ode ls bu t  I'm not  s ure  w hic h cla s s shou ld Iexte nd  ( D efa ultTabl e Mo d e l, A bs tr actT abl eM odel)  and wha t metho ds I shou ldo verr id e. 

A:

I nput is limit ed  to 20x20so  in cludin g the head ers that's 22x22.

Also conside r a  JScr ollP ane conta ini ng a J Pan e l havi ng Gri dLayo ut  an d conta i n in g 2 2x 22 instanc e s  JL abel,  o r asuitabl e subclass. This s c ale s easily to s eve ralt h ou san d  c e lls .A dde n d um: If the need  arises, C el l Re ndererPane mak es  a good  flywei ght r e nderer,  as sugge sted here .If y o u  go  with JTab le for r enderings calab i li ty,
Thi s is n oabu se; i t is e x act ly ho w Tabl eM odel i s int en ded to b e used. TableModel mode ls a r ectan gul ar matrix  of wha tever you  dec ide. JTabl e i s j ust a n ( e ffici entl y  r end e red)view of that m o de l.I pr efer Abstra c t T abl eMode l,s hown h ere,  because Vector i s  rarely the de sire d dat a s t ruct ur e. Use whateve r c on t a iner mak es  your index ing most  c o nveni ent. D efault TableMo d e li s hand y an d s erves asa g ui d e to ex te nd i ng Abs trac tT ableMo del. I n  par t i cular
ions/3.7/lib/python3.7/genericpath.py", line_96, in_samefile
   _s1 =_os.stat(f1)
TypeError:_stat: path_should_be string, bytes,_os.PathLike or integer,_not NoneType

A:

For making a_virtual environment with_Python_3
Use this for making env
python3 -m venv env

To activate env
source env/bin/activate

 Q:

Creating a custom_TableModel_with multiple_column_headers_and row headers

I'm attempting to_create a JTable that looks_like the_mockup below:

The green corner is basically buffer-space for_the_red column and_row headers. The cells don't need to be rendered_in the colours pictured; however they_need to be_distinguishable_from_the rest of the_'white' cells in the table.
This table_also is not editable or selectable;_it's merely viewed by a user whilst_it is updated.
I know this can_be achieved using a DefaultTableModel_with custom_renders for rows 1,2 &&_cols 1,2 and_adding +2_when setting and_getting table values (accounting for the_rows and columns_that are being used as headers).
My_questions_are as follows:

Is_there_a_cleaner way_of doing this_without_polluting my_table_model with these static values used_in_headers?
I've read about extending table models but_I'm not sure which_class_should I extend (DefaultTableModel,_AbstractTableModel) and what methods I_should override.

A:

Input is limited to 20x20_so including_the headers_that's 22x22.

Also consider a JScrollPane containing a JPanel having GridLayout and_containing 22x22 instances JLabel, or a_suitable subclass. This scales_easily to_several_thousand cells.
Addendum: If_the_need arises,_CellRendererPane makes a good flyweight renderer, as_suggested here.
If_you go with JTable for rendering_scalability,

This is no abuse;_it_is exactly how TableModel is intended_to be used. TableModel models a_rectangular matrix of whatever you_decide._JTable_is just an (efficiently rendered)_view of that model.
I prefer AbstractTableModel,_shown here, because_Vector is rarely the desired data structure._Use_whatever container makes your indexing most_convenient._DefaultTableModel is handy and serves as_a_guide_to extending AbstractTableModel. In particular