strut, glue, rigid area in BoxLayout


盒子排版器(BoxLayout)有3種無互動,純佔面積用之視窗元件可用,
摘要如下,


1.strut (支架)
Component v = Box.createVerticalStrut(h); //新增隱形固定高度h像素之垂直支架
Component h = Box.createHorizontalStrut(w); //新增隱形固定寬度w像素之水平支架

2.glue (黏膠)
Component v = Box.createVerticalGlue(); //新增隱形垂直等間隔黏膠
Component h = Box.createHorizontalGlue(); //新增隱形水平等間隔黏膠
Component g = Box.createGlue(); //新增隱形等間隔黏膠,適用於垂直或水平盒子排版器

3.rigid area (硬塊), 相當於2維支架
Dimension d = new Dimension(h,w); // 新增寬h,高w尺寸
Component ra = Box.createRigidArea(d); // 依給定尺寸新增隱形硬塊

PS:
deitel-php-05-java how to program 6th ed

沒有留言:

Building a Lightweight Streamlit Client for Local Ollama LLM Interaction

Ollama 提供端點串接服務,可由程式管理及使用本地大語言模型(LLM, Large Language Model)。 以下程式碼展示如何以 Streamlit 套件,建立一個輕量級的網頁介面,供呼叫 本地端安裝的 Ollama 大語言模型。 Ollama 預設的服務...

總網頁瀏覽量