本文整理汇总了Python中javax.swing.JLabel方法的典型用法代码示例。如果您正苦于以下问题:Python swing.JLabel方法的具体用法?Python swing.JLabel怎么用?Python swing.JLabel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.swing
的用法示例。
在下文中一共展示了swing.JLabel方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from javax import swing [as 别名]
# 或者: from javax.swing import JLabel [as 别名]
def __init__(self, extender):
# Initialize self
super(TitlePanel, self).__init__()
self.extender = extender
self.setLayout(GridLayout(2, 1))
# Create children
self.title = JLabel('Tracer')
self.subtitle = JPanel()
self.label = JLabel('Allows you to trace where inputs are reflected back to the user. Click "Start" to analyze the current site map.')
# Configure children
self.title.setFont(Fonts.Heading)
self.title.setForeground(Colors.Orange)
self.subtitle.layout.hgap = 0
# Add children
self.add(self.title)
self.add(self.subtitle)
self.subtitle.add(self.label)
示例2: __init__
# 需要导入模块: from javax import swing [as 别名]
# 或者: from javax.swing import JLabel [as 别名]
def __init__(self, callbacks, log):
self.callbacks = callbacks
self.log = log
self.log_table = None # to be set by caller
self.setLayout(BoxLayout(self, BoxLayout.PAGE_AXIS))
label = JLabel("Reload from Git Repo:")
button = JButton("Reload")
button.addActionListener(CommandPanel.ReloadAction(log))
self.add(label)
self.add(button)
label = JLabel("Send selected entries to respective Burp tools:")
button = JButton("Send")
button.addActionListener(CommandPanel.SendAction(self))
self.add(label)
self.add(button)
label = JLabel("Remove selected entries from Git Repo:")
button = JButton("Remove")
button.addActionListener(CommandPanel.RemoveAction(self, log))
self.add(label)
self.add(button)
# TODO: maybe add a git command box
示例3: initUI
# 需要导入模块: from javax import swing [as 别名]
# 或者: from javax.swing import JLabel [as 别名]
def initUI(self):
self.tab = swing.JPanel()
# UI for Output
self.outputLabel = swing.JLabel("LinkFinder Log:")
self.outputLabel.setFont(Font("Tahoma", Font.BOLD, 14))
self.outputLabel.setForeground(Color(255,102,52))
self.logPane = swing.JScrollPane()
self.outputTxtArea = swing.JTextArea()
self.outputTxtArea.setFont(Font("Consolas", Font.PLAIN, 12))
self.outputTxtArea.setLineWrap(True)
self.logPane.setViewportView(self.outputTxtArea)
self.clearBtn = swing.JButton("Clear Log", actionPerformed=self.clearLog)
self.exportBtn = swing.JButton("Export Log", actionPerformed=self.exportLog)
self.parentFrm = swing.JFileChooser()
# Layout
layout = swing.GroupLayout(self.tab)
layout.setAutoCreateGaps(True)
layout.setAutoCreateContainerGaps(True)
self.tab.setLayout(layout)
layout.setHorizontalGroup(
layout.createParallelGroup()
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup()
.addComponent(self.outputLabel)
.addComponent(self.logPane)
.addComponent(self.clearBtn)
.addComponent(self.exportBtn)
)
)
)
layout.setVerticalGroup(
layout.createParallelGroup()
.addGroup(layout.createParallelGroup()
.addGroup(layout.createSequentialGroup()
.addComponent(self.outputLabel)
.addComponent(self.logPane)
.addComponent(self.clearBtn)
.addComponent(self.exportBtn)
)
)
)