我想找到计算机上安装的当前Java版本的版本号,以及任何具有闪存的Web浏览器上安装的Flash的当前版本.有没有办法使用Java,C或C++来做到这一点?如果是这样,我应该研究哪个类/库?
我是android编程的新手.你如何使用android:onClick?我在哪里放置我想要的方法?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1"
android:text="Button"
android:onClick="doSomething"/>
<ImageView
android:id="@+id/icon"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:adjustViewBounds="true"
android:src="@drawable/molecule" />
Run Code Online (Sandbox Code Playgroud)
我会把它放在调用这个布局的.java文件中吗?
我正在尝试使用Pythontkinter.Text
创建文本区域。这样,我想获取他们放入该文本区域的所有输入并将其显示在其上方的输入字段中。它给出一个错误,说它需要两个参数。
from Tkinter import *
def create_index():
var = body.get(0)
link.insert(10,var)
file.close()
master = Tk()
Label(master, text="Link:").grid(row=0)
Label(master, text="Body:").grid(row=1)
link = Entry(master)
body = Text(master)
link.grid(row=0, column=1)
body.grid(row=1, column=1)
Button(master, text='Show', command=create_index).grid(row=3, column=1, sticky=W, pady=4)
mainloop()
Run Code Online (Sandbox Code Playgroud)