view src/luan/modules/swing/Label.luan @ 1722:7d2ab44f7a59 default tip

remove String regex fns
author Franklin Schmidt <fschmidt@gmail.com>
date Fri, 29 Jul 2022 14:12:01 -0600
parents 915cb538e2a3
children
line wrap: on
line source

local Luan = require "luan:Luan.luan"
local error = Luan.error
local set_metatable = Luan.set_metatable or error()
require "java"
local JLabel = require "java:javax.swing.JLabel"


local Label = {}

local mt = {}

function mt.__index(label,key)
	error("'"..key.."' not defined")
end

function mt.__new_index(label,key,value)
	error("'"..key.."' not defined")
end

function Label.new(text)
	local jlabel = JLabel.new(text)
	local label = { java = jlabel }
	set_metatable(label,mt)
	return label
end

return Label