Questions tagged as 'java'

1
answer

How to do a login authentication?

I'm having a problem signing in to. I have a simple page: Ijustneedtoquerythedatabaseifthevalueenteredbytheuseristhesame.Thisonehere:Model:@EntitypublicclassUser{@Id@GeneratedValue(strategy=GenerationType.IDENTITY)privateIntegerid;@Column...
asked by 12.06.2017 / 23:21
1
answer

How to check if a JInternalFrame is already open in JDesktopPane?

How to check if a JInternalFrame is already open in JDesktopPane and, if so, put it in focus on the others? I have tried in many ways that I found searching, but always opens a new frame, even if it is already open. This is the...
asked by 11.06.2017 / 01:37
1
answer

Filter in a project that consists of several projects and that run on different ports (Spring Boot)

I would like to know if there is (and how can I) develop an application that is made up of several other applications and to access these other parts of the application I need to be logged in. Do I believe that this concept is linked to micros...
asked by 01.07.2017 / 06:36
1
answer

Set FloatingActionButton size on Android

private FloatingActionButton createButton(int id) { FloatingActionButton fab = new FloatingActionButton(this); fab.setId(id); fab.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v)...
asked by 29.06.2017 / 23:45
1
answer

Email validation [duplicate]

How to make this edittext only valid for an email? That contains for example [email protected] that contains at least the "@"? @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);...
asked by 12.07.2017 / 14:41
1
answer

Retrieving EditText text in AlertDialog

Good afternoon, I have a problem ... Clicking a button brings up the custom alertDialog, that is, it contains an EditText in it and a positive button for completion. Only I need to retrieve the text of the editText so I can insert it into my d...
asked by 13.07.2017 / 21:36
1
answer

How to save a csv using hibernate and mysql [closed]

I need to do the following routine: Read some information from the database; Generate a csv based on this data; Save this csv to the database; Start downloading this file to the user. I was able to do items 1 and 2, generating the f...
asked by 12.07.2017 / 16:00
1
answer

Do not add to the database when any value is null

How do I not add to the database when the String day is null? Code: public boolean insertData(String disciplina,String sala,String dia,String hora){ ContentValues values = new ContentValues(); values.put(COL_2,disciplina);...
asked by 12.07.2017 / 23:02
1
answer

How to draw a picture with Canvas?

I have this code and want to draw an image: public void render(){ BufferStrategy bs = getBufferStrategy(); if(bs == null) { createBufferStrategy(3); return; } Graphics g = bs.getDrawGraphics(); g.dispo...
asked by 09.07.2017 / 04:15
1
answer

How to use FindviewById and Onclick on a fragment?

I added two tabs in the main activity layout, and created two java class, one for each tab. So I took the activity xml buttons from main activity and put it in the fragment layout, but I will use the find view by id in the java class of the frag...
asked by 09.07.2017 / 20:48