我加入的动态JTextField,并JLabel在panel1但我不能够设置的布局JTextField和JLabel.我需要添加JTextfield和JLabel对panel1我补充panel1到panel.我需要以上下方式添加JTextFields和JLabels并设置布局.panel1并且panel是JPanel的实例.
我的代码:
public class MakeScrollablePanel extends JFrame implements ActionListener
{
static JButton jButton11,jButton12;
static JPanel panel,panel1;
static JTextField jTextFields;
static JLabel label;
static JComboBox<String> jComboBox;
static Dimension dime,dime1,dime2,dime3,dime4,dime5;
static JScrollPane scroll;
private GridBagConstraints panelConstraints = new GridBagConstraints();
BoxLayout bx=null;// @jve:decl-index=0:
int count=1,i=0;
public MakeScrollablePanel()
{
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
Show();
add(jButton11);
add(scroll);
dime=new Dimension(600,550);
setSize(dime); …Run Code Online (Sandbox Code Playgroud) 我正在使用SPARQL查询OWL本体,但结果显示了链接和数据.我只想要数据.如何删除链接并显示数据?我得到的输出是:
---------------------------------------------------------------------------------------------------------------------------
| Email | ind | ind1 |
===========================================================================================================================
| "5"^^<http://www.w3.org/2001/XMLSchema#decimal> | my:HotelCityPark | "Hotel"^^<http://www.w3.org/2001/XMLSchema#string> |
---------------------------------------------------------------------------------------------------------------------------
Run Code Online (Sandbox Code Playgroud)
我想要的输出是(请注意,^^<http://www.w3.org/2001/XMLSchema#decimal>不再存在的部分.
---------------------------------
| Email | ind | ind1 |
=================================
| 5 | HotelCityPark | Hotel |
---------------------------------
Run Code Online (Sandbox Code Playgroud)
这是我的Java代码和我的OWL本体:
class jena_testing
{ public static void main(String[] args) {
String filename="modified2.owl";
Model model=ModelFactory.createDefaultModel();
OntModel model1=ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM,model);
try
{
File file=new File(filename);
FileInputStream reader=new FileInputStream(file);
model.read(reader,null);
String query1="PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>"+
"PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>"+
"PREFIX my: <http://www.semanticweb.org/rohit/ontologies/2014/4/untitled-ontology-20#>"+
"SELECT ?Email ?ind ?ind1"+
" WHERE {"+ …Run Code Online (Sandbox Code Playgroud)